Created
September 9, 2009 06:11
-
-
Save masaki/183512 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
package Options; | |
use Mouse; | |
with 'MouseX::Getopt'; | |
has 'help' => ( | |
is => 'rw', | |
isa => 'Bool', | |
default => 0, | |
); | |
package main; | |
use Pod::Usage; | |
my $opt = Options->new_with_options; | |
pod2usage(2) if $opt->help; | |
__END__ | |
=head1 NAME | |
sample - Using MouseX::Getopt and Pod::Usage | |
=head1 SYNOPSIS | |
sample [options] | |
Options: | |
-h,--help brief help message | |
=cut |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment