Configure::Writer(3)
hey bestie ✨ welcome to the Configure::Writer(3) page from User Contributed Perl Documentation — aka the glow-up of XMLTV::Configure::Writer. It's giving “small but mighty utility class” energy, and we're about to get into every detail. 💅
🌸 NAME 🌸
XMLTV::Configure::Writer — Configuration file writer for XMLTV grabbers. That's the whole name, no cap. It's the class your grabber uses when it needs to write configuration descriptions. 🫶
📝 DESCRIPTION 📝
Utility class that helps grabbers write configuration descriptions. Lowkey iconic: it handles the configuration-description writing so your grabber can main-character its way through setup. ✨
🎀 SYNOPSIS 🎀
Okay so here's the vibe in code — copy this exactly, bestie, because this is the literal synopsis:
use XMLTV::Configure::Writer;
my $result;
my $writer = new XMLTV::Writer::Configure( OUTPUT => \$result,
encoding => 'iso-8859-1' );
$writer->start( { grabber => 'tv_grab_xxx' } );
$writer->write_string( {
id => 'username',
title => [ [ 'Username', 'en' ],
[ 'Användarnamn', 'sv' ] ],
description => [ [ 'The username for logging in to DataDirect.', 'en' ],
[ 'Användarnamn hos DataDirect', 'sv' ] ],
} );
$writer->start_selectone( {
id => 'lineup',
title => [ [ 'Lineup', 'en' ],
[ 'Programpaket', 'sv' ] ],
description => [ [ 'The lineup of channels for your region.', 'en' ],
[ 'Programpaket för din region', 'sv' ] ],
} );
$writer->write_option( {
value=>'eastcoast',
text=> => [ [ 'East Coast', 'en' ],
[ 'Östkusten', 'sv' ] ]
} );
$writer->write_option( {
value=>'westcoast',
text=> => [ [ 'West Coast', 'en' ],
[ 'Västkusten', 'sv' ] ]
} );
$writer->end_selectone();
$writer->end();
print $result;
🚫 EXPORTED FUNCTIONS 🚫
- None. — that's it. No exports, no extras, no surprise functions. The section is literally
None.and we respect that. 💀
🛠️ METHODS 🛠️
The methods are below, with all the details. 🦋
✨ start() ✨
Writes the start of the <xmltvconfiguration> element. The parameter is a hashref that gives the attributes of this element. So you hand it a hashref, it opens the element with those attributes — cute and straightforward. 🎀
✨ write_string() ✨
Writes a <string> element. The parameter is a hashref with the data for the element:
$writer->write_string( {
id => 'username',
title => [ [ 'Username', 'en' ],
[ 'Användarnamn', 'sv' ] ],
description => [ [ 'The username for logging in to DataDirect.', 'en' ],
[ 'Användarnamn hos DataDirect', 'sv' ] ],
default => "",
} );
To add a constant, use the 'constant' key: if the constant value is empty then revert to the 'ask' procedure. (Yes, that's the rule — empty constant means the ask procedure comes back. 👑)
$writer->write_string( {
id => 'version',
title => [ [ 'Version number', 'en' ] ],
description => [ [ 'Automatically added version number - no user input', 'en' ] ],
constant => '123',
} );
that's the whole page, bestie 💖 — brought to you by perl v5.42.2, dated 2025-06-30, on the Configure::Writer(3) page. mwah 💋
📦 where this page comes from
- alpine 3.24: xmltv-doc 1.4.0-r1 · GPL-2.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms