Lire::LrCommand3pm
Base class for command line programs.
Usage
my $prog = new Lire::LrCommand();$prog->init();$prog->add_section( 'myprog', __( 'My Program Options' ) );$prog->add_option( 'name' => 'myoption', 'type' => '=s','help' => __( 'My option help.' ) );$prog->add_common_options();$prog->parse_options();
Overview
Class which is used to create command line program which shares functionaliy.
Methods
new( [$usage], [$help] )
Creates a new Lire::LrCommon instance. Initializes the usage string and the help message to $usage and $help.
set_usage( [$usage] )
set_help( [$help] )
set_section( [$name], [$label] )
add_option( [%args] )
add_common_options()
import_log( [$converter], [$logfile] )
import_log invokes Lire::ImportJob and Lire::DlfConverterProcess. It uses &handle_logfile.
This means that in case the $logfile is compressed, it is decompressed to a file in $TMPDIR. In case the $logfile is read from a pipe or from STDIN, it is written to a file in $TMPDIR. So, if you're short on discspace, pass the logfile as an uncompressed file.
generate_report( [$converter], [$logfile] )
Generate a report from a $logfile, using $converter. Returns $reportfile. Uses Lire::ReportConfig::generate_report to do the real work.
Version
$Id: LrCommand.pm,v 1.9 2006/07/23 13:16:29 vanbaal Exp $
Releases
6 releases since Debian 3.1 (Sarge); the text changed 5 times.