Peter Flanigan > CatalystX-Usul-0.17.1 > CatalystX::Usul::CLI

Download:
catalystx-usul/CatalystX-Usul-0.17.1.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: v0.17.1   Source  

Name ^

CatalystX::Usul::CLI - Subroutines accessed from the command line

Version ^

Describes v0.17.$Rev: 1 $

Synopsis ^

   use CatalystX::Usul::CLI;

   exit CatalystX::Usul::CLI->new_with_options
      ( appclass => 'YourApp' )->run;

Description ^

Some generic methods that may be applied to multiple applications. They can be called via the command line. See Class::Usul::Programs

Configuration and Environment ^

Defines the following attributes

delete_after

Integer which defaults to 35. House keeping deletes archive file after this many days

Subroutines/Methods ^

archive

   $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

bson64_id

   $exit_code = $self->bson64_id( $count );

Exposes bson64id. Outputs $count (defaults to one) BSON64 ids

dump_meta

   $exit_code = $self->dump_meta;

Use Data::Printer to dump the applications META.yml file

house_keeping

   $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

pod2html

   $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

purge_tree

   $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

rotate_logs

   $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

tape_backup

   $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

translate

   $exit_code = $self->translate( @paths );

Uses File::DataClass to translate from one file format to another

unarchive

   $exit_code = $self->unarchive( @paths );

Reverses the action of "archive"

uuid

   $exit_code = $self->uuid

Outputs a UUID from the system

wait_for

   $exit_code = $self->wait_for( $key, $max_wait, $no_thrash );

Waits for a specified file for a specified time

Diagnostics ^

None

Dependencies ^

CatalystX::Usul::TraitFor::PostInstallConfig
CatalystX::Usul::Constants
CatalystX::Usul::FileSystem
CatalystX::Usul::ProjectDocs
CatalystX::Usul::TapeBackup
Class::Usul::Programs
CatalystX::Usul::Moose
CatalystX::Usul::Constraints

Incompatibilities ^

There are no known incompatibilities in this module

Bugs and Limitations ^

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author ^

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright ^

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

syntax highlighting: