package Test; BEGIN { use Term::ReadKey; my ($width, $height, $pixel_width, $pixel_height) = GetTerminalSize(); #print "WIDTH: $width\n"; $Pod::Usage::Formatter = 'Pod::Text::Termcap'; $Pod::Usage::width = $width; } use Pod::Usage; use Pod::Find qw(pod_where); # stuff GetOptionsFromArray( \@args , 'help|?' => sub { pod2usage( -width => $width, -input => pod_where( {-inc => 1}, __PACKAGE__), -exitval => 1 ); }, 'man' => sub { pod2usage( -input => pod_where( {-inc => 1}, __PACKAGE__), -exitval => 2, -verbose => 2 ); }, );