use Local::Stuff; # See below my %o = ( help => sub { pod2usage( -verbose => 2 ) }, # ... defaults go here ... ); GetOptions(\%o, qw< help option=s other=i >) or pod2usage(); __END__ =head1 POD Documentation