| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | package Bot::Net::Script; | ||
| 5 | use base qw/ App::CLI /; | ||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Bot::Net::Script - implementation of the Bot::Net command-line interface | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | bin/botnet <command> <options> | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | This is a command-line interface handler based on L<App::CLI>. This module doesn't really do a lot more than just inherit from L<App::CLI> and handle a few special cases. | ||
| 18 | |||
| 19 | =cut | ||
| 20 | |||
| 21 | sub prepare { | ||
| 22 | my $self = shift; | ||
| 23 | |||
| 24 | if ($ARGV[0] =~ /--?h(elp?)/i) { | ||
| 25 | $ARGV[0] = 'help'; | ||
| 26 | } | ||
| 27 | |||
| 28 | return $self->SUPER::prepare(@_); | ||
| 29 | } | ||
| 30 | |||
| 31 | =head1 SEE ALSO | ||
| 32 | |||
| 33 | L<App::CLI> | ||
| 34 | |||
| 35 | =head1 AUTHORS | ||
| 36 | |||
| 37 | Andrew Sterling Hanenkamp C<< <hanenkamp@cpan.org> >> | ||
| 38 | |||
| 39 | =head1 COPYRIGHT AND LICENSE | ||
| 40 | |||
| 41 | Copyright 2007 Boomer Consulting, Inc. All Rights Reserved. | ||
| 42 | |||
| 43 | This program is free software and may be modified or distributed under the same terms as Perl itself. | ||
| 44 | |||
| 45 | =cut | ||
| 46 | |||
| 47 | 1; |