| 1 | package App::Sandy::CLI; | ||
| 2 | # ABSTRACT: Base class for command line interface. | ||
| 3 | |||
| 4 | 1 | ▶ | use App::Sandy::Base 'class'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | use Path::Class 'file'; | ||
| 6 | |||
| 7 | our $VERSION = '0.25'; # VERSION | ||
| 8 | |||
| 9 | has 'argv' => ( | ||
| 10 | is => 'ro', | ||
| 11 | isa => 'ArrayRef', | ||
| 12 | default => sub { \@ARGV } | ||
| 13 | ); | ||
| 14 | |||
| 15 | has 'progname' => ( | ||
| 16 | is => 'ro', | ||
| 17 | isa => 'Str', | ||
| 18 | default => file($0)->basename | ||
| 19 | ); | ||
| 20 | |||
| 21 | sub opt_spec { | ||
| 22 | 'help|h', | ||
| 23 | 'man|H' | ||
| 24 | } | ||
| 25 | |||
| 26 | __END__ | ||