NAME
BuzzSaw::Cmd - Super-class for BuzzSaw command line applications
VERSION
This documentation refers to BuzzSaw::Cmd version 0.11.2
SYNOPSIS
package BuzzSaw::Cmd::Example;
use Moose;
extends 'BuzzSaw::Cmd';
sub abstract { return q(Short help text for this app) }
sub execute {
my ( $self, $opt, $args ) = @_;
....
}
DESCRIPTION
This is a super-class that should be extended by each class which represents a BuzzSaw command-line application. This class allows easy handling of command-line options and automates the generation of short usage documentation.
The BuzzSaw project provides a suite of tools for processing log file entries. Entries in files are parsed and filtered into a set of events of interest which are stored in a database. A report generation framework is also available which makes it easy to generate regular reports regarding the events discovered.
ATTRIBUTES
The following attributes are available for all modules which extend this class and will be available as command-line options in the applications. Any further attributes you add in a sub-class can also be used as command-line options by applying the Getopt
trait, see MooseX::Getopt for details.
- verbose
-
Ensure the logging level is at least
verbose
, this will enable INFO messages. - debug
-
Ensure the logging level is at least
debug
, this will enable DEBUG and INFO messages. - logconf
-
BuzzSaw applications use the Log::Log4perl module for all logging. By default the applications will be configured to send messages to stdout/stderr at the WARN level. If you wish to do something more complicated you can pass in a path to a configuration file and it will be used to initialise the logger. The default path is
/etc/buzzsaw/log4perl.conf
SUBROUTINES/METHODS
- abstract
-
This method may be used to return a short string which describes the purpose of the application. The abstract is used when auto-generating help messages.
- execute
-
This method does the actual work of the application and it MUST be implemented.
DEPENDENCIES
This module is powered by Moose. You will also need MooseX::App::Cmd and Log::Log4perl
SEE ALSO
BuzzSaw, MooseX::App::Cmd::Command, App::Cmd::Command, MooseX::Getopt
PLATFORMS
This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.
ScientificLinux6
BUGS AND LIMITATIONS
Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.
AUTHOR
Stephen Quinney <squinney@inf.ed.ac.uk>
LICENSE AND COPYRIGHT
Copyright (C) 2012 University of Edinburgh. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.