GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Configure::Writer(3) User Contributed Perl Documentation Configure::Writer(3)

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

Utility class that helps grabbers write configuration descriptions.

  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;

None.

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' ],
               [ 'Anv�ndarnamn', 'sv' ] ],
    description => [ [ 'The username for logging in to DataDirect.', 'en' ],
                     [ 'Anv�ndarnamn 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',
    } );
    
2022-04-12 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.