Lire::LrCommand(3pm)

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.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. Arch

Author

  Francis J. Lacoste <[email protected]>

From lire 2.1.1-8 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.