CatalystX::Usul::CLI - Subroutines accessed from the command line
Describes v0.17.$Rev: 1 $
use CatalystX::Usul::CLI; exit CatalystX::Usul::CLI->new_with_options ( appclass => 'YourApp' )->run;
Some generic methods that may be applied to multiple applications. They can be called via the command line. See Class::Usul::Programs
Defines the following attributes
Integer which defaults to 35. House keeping deletes archive file after this many days
$exit_code = $self->archive( @paths );
Calls archive. The remaining non switch extra argument values from the command line will be used as the list of paths to archive
$exit_code = $self->bson64_id( $count );
Exposes bson64id. Outputs $count (defaults to one) BSON64 ids
$count
$exit_code = $self->dump_meta;
Use Data::Printer to dump the applications META.yml file
$exit_code = $self->house_keeping;
Deletes old files from the applications temporary file directory. Archives and deletes old report files from the applications report directory. Archives and deletes old data files from the applications data file interface directory tree. Rotates the log files in the applications log file directory
$exit_code = $self->pod2html;
Uses CatalystX::Usul::ProjectDocs to generate HTML documentation from the applications POD. Non default code library directory is the first non switch argument value on the command line followed by a non default root directory for the HTML output
$exit_code = $self->purge_tree( $directory, $archive_time, $delete_time );
Archive and subsequently delete files from the specified directory tree once they have become sufficiently old. The $directory is the first non switch argument value on the command line
$directory
$exit_code = $self->rotate_logs( $directory, $copies, $extension );
Rotate the log files (with optional file extension if it is not .log) in the specified directory. Defaults to keeping the last five files. The $directory is the first non switch argument value on the command line
$exit_code = $self->tape_backup( @paths );
Calls the tape backup method. Passes any key / value pairs from the command line options as the first argument, followed by a list of paths from the extra non switch arguments on the command line
$exit_code = $self->translate( @paths );
Uses File::DataClass to translate from one file format to another
$exit_code = $self->unarchive( @paths );
Reverses the action of "archive"
$exit_code = $self->uuid
Outputs a UUID from the system
$exit_code = $self->wait_for( $key, $max_wait, $no_thrash );
Waits for a specified file for a specified time
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
Copyright (c) 2014 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install CatalystX::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::Usul
CPAN shell
perl -MCPAN -e shell install CatalystX::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.