1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
use Scriptalicious
-progname => "pu";
our $VERSION = "1.00";
my $url = ".";
getopt("u|url" => \$url);
run("echo", "doing something with $url");
my ($rv, $output) = capture_err("cat", $url);
say "the rc from the `cat $url' command was $?";
__END__
=head1 NAME
pu - an uncarved block of wood
=head1 SYNOPSIS
pu [options] arguments
=head1 DESCRIPTION
This script's function is to be a blank example that many
great and simple scripts may be built upon.
Remember, you cannot carve rotten wood.
=head1 COMMAND LINE OPTIONS
=over
=item B<-h, --help>
Display a program usage screen and exit.
=item B<-V, --version>
Display program version and exit.
=item B<-v, --verbose>
Verbose command execution, displaying things like the
commands run, their output, etc.
=item B<-q, --quiet>
Suppress all normal program output; only display errors and
warnings.
=item B<-d, --debug>
Display output to help someone debug this script, not the
process going on.
=back
|