BuzzSaw::Cmd - Super-class for BuzzSaw command line applications
This documentation refers to BuzzSaw::Cmd version 0.12.0
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 ) = @_; .... }
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.
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.
Getopt
Ensure the logging level is at least verbose, this will enable INFO messages.
verbose
Ensure the logging level is at least debug, this will enable DEBUG and INFO messages.
debug
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
/etc/buzzsaw/log4perl.conf
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.
This method does the actual work of the application and it MUST be implemented.
This module is powered by Moose. You will also need MooseX::App::Cmd and Log::Log4perl
BuzzSaw, MooseX::App::Cmd::Command, App::Cmd::Command, MooseX::Getopt
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
Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.
Stephen Quinney <squinney@inf.ed.ac.uk>
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.
To install BuzzSaw::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BuzzSaw::DB
CPAN shell
perl -MCPAN -e shell install BuzzSaw::DB
For more information on module installation, please visit the detailed CPAN module installation guide.