App-Framework
view release on metacpan or search on metacpan
examples/eg1.pl view on Meta::CPAN
#=================================================================================
#----------------------------------------------------------------------
# Main execution
#
sub app
{
my ($app) = @_ ;
# Get source/dest dirs
my ($src_dir, $backup_dir) = $app->args();
# options
my %opts = $app->options() ;
if ($opts{array})
{
$app->prt_data("Array option=", $opts{array}) ;
}
if ($opts{hash})
{
examples/eg1.pl view on Meta::CPAN
28-May-08 SDP New
[SUMMARY]
An example of using the application framework with named arguments
[ARGS]
* src_dir=d Source directory
* backup_dir=d Backup directory
[OPTIONS]
-database=s Database name [default=test]
Specify the database name to use
-int=i An integer
Example of integer option
( run in 0.574 second using v1.01-cache-2.11-cpan-49f99fa48dc )