.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Configure::Writer 3pm" .TH Configure::Writer 3pm 2024-02-24 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME XMLTV::Configure::Writer \- Configuration file writer for XMLTV grabbers .SH DESCRIPTION .IX Header "DESCRIPTION" Utility class that helps grabbers write configuration descriptions. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use XMLTV::Configure::Writer; \& \& my $result; \& my $writer = new XMLTV::Writer::Configure( OUTPUT => \e$result, \& encoding => \*(Aqiso\-8859\-1\*(Aq ); \& $writer\->start( { grabber => \*(Aqtv_grab_xxx\*(Aq } ); \& $writer\->write_string( { \& id => \*(Aqusername\*(Aq, \& title => [ [ \*(AqUsername\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqAnvändarnamn\*(Aq, \*(Aqsv\*(Aq ] ], \& description => [ [ \*(AqThe username for logging in to DataDirect.\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqAnvändarnamn hos DataDirect\*(Aq, \*(Aqsv\*(Aq ] ], \& } ); \& $writer\->start_selectone( { \& id => \*(Aqlineup\*(Aq, \& title => [ [ \*(AqLineup\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqProgrampaket\*(Aq, \*(Aqsv\*(Aq ] ], \& description => [ [ \*(AqThe lineup of channels for your region.\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqProgrampaket för din region\*(Aq, \*(Aqsv\*(Aq ] ], \& } ); \& \& $writer\->write_option( { \& value=>\*(Aqeastcoast\*(Aq, \& text=> => [ [ \*(AqEast Coast\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqÖstkusten\*(Aq, \*(Aqsv\*(Aq ] ] \& } ); \& \& $writer\->write_option( { \& value=>\*(Aqwestcoast\*(Aq, \& text=> => [ [ \*(AqWest Coast\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqVästkusten\*(Aq, \*(Aqsv\*(Aq ] ] \& } ); \& \& $writer\->end_selectone(); \& \& $writer\->end(); \& \& print $result; .Ve .SH "EXPORTED FUNCTIONS" .IX Header "EXPORTED FUNCTIONS" None. .SH METHODS .IX Header "METHODS" .IP \fBstart()\fR 4 .IX Item "start()" Write the start of the element. Parameter is a hashref which gives the attributes of this element. .IP \fBwrite_string()\fR 4 .IX Item "write_string()" Write a element. Parameter is a hashref with the data for the element: .Sp .Vb 8 \& $writer\->write_string( { \& id => \*(Aqusername\*(Aq, \& title => [ [ \*(AqUsername\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqAnvändarnamn\*(Aq, \*(Aqsv\*(Aq ] ], \& description => [ [ \*(AqThe username for logging in to DataDirect.\*(Aq, \*(Aqen\*(Aq ], \& [ \*(AqAnvändarnamn hos DataDirect\*(Aq, \*(Aqsv\*(Aq ] ], \& default => "", \& } ); .Ve .Sp To add a constant use 'constant' key: If constant value is empty then revert to 'ask' procedure. .Sp .Vb 6 \& $writer\->write_string( { \& id => \*(Aqversion\*(Aq, \& title => [ [ \*(AqVersion number\*(Aq, \*(Aqen\*(Aq ] ], \& description => [ [ \*(AqAutomatically added version number \- no user input\*(Aq, \*(Aqen\*(Aq ] ], \& constant => \*(Aq123\*(Aq, \& } ); .Ve