Skip to content

Instantly share code, notes, and snippets.

@masaki
Created September 9, 2009 06:11
Show Gist options
  • Save masaki/183512 to your computer and use it in GitHub Desktop.
Save masaki/183512 to your computer and use it in GitHub Desktop.
#!/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