Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Configure::Writer(3)  User Contributed Perl Documentation Configure::Writer(3)

NAME
       XMLTV::Configure::Writer	- Configuration	file writer for	XMLTV grabbers

DESCRIPTION
       Utility class that helps	grabbers write configuration descriptions.

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' ],
		      [	'Anvi?1/2ndarnamn', 'sv' ] ],
	   description => [ [ 'The username for	logging	in to DataDirect.', 'en' ],
			    [ 'Anvi?1/2ndarnamn	hos DataDirect', 'sv' ]	],
	   } );
	 $writer->start_selectone( {
	   id => 'lineup',
	   title => [ [	'Lineup', 'en' ],
		      [	'Programpaket',	'sv' ] ],
	   description => [ [ 'The lineup of channels for your region.', 'en' ],
			    [ 'Programpaket fi?1/2r din	region', 'sv' ]	],
	   } );

	 $writer->write_option(	{
	   value=>'eastcoast',
	   text=> => [ [ 'East Coast', 'en' ],
		       [ 'i?1/2stkusten', 'sv' ] ]
	 } );

	 $writer->write_option(	{
	   value=>'westcoast',
	   text=> => [ [ 'West Coast', 'en' ],
		       [ 'Vi?1/2stkusten', 'sv'	] ]
	 } );

	 $writer->end_selectone();

	 $writer->end();

	 print $result;

EXPORTED FUNCTIONS
       None.

METHODS
       start()
	   Write the start of the <xmltvconfiguration> element.	 Parameter is
	   a hashref which gives the attributes	of this	element.

       write_string()
	   Write a <string> element. Parameter is a hashref with the data for
	   the element:

	     $writer->write_string( {
	       id => 'username',
	       title =>	[ [ 'Username',	'en' ],
			  [ 'Anvi?1/2ndarnamn',	'sv' ] ],
	       description => [	[ 'The username	for logging in to DataDirect.',	'en' ],
				[ 'Anvi?1/2ndarnamn hos	DataDirect', 'sv' ] ],
	       default => "",
	       } );

	   To add a constant use 'constant' key:      If constant value	is
	   empty then revert to	'ask' procedure.

	     $writer->write_string( {
	       id => 'version',
	       title =>	[ [ 'Version number', 'en' ] ],
	       description => [	[ 'Automatically added version number -	no user	input',	'en' ] ],
	       constant	=> '123',
	       } );

perl v5.32.0			  2020-08-27		  Configure::Writer(3)

NAME | DESCRIPTION | SYNOPSIS | EXPORTED FUNCTIONS | METHODS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XMLTV::Configure::Writer&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help