in reply to Parsing Pod::Text

I think what you're suggesting is overkill.

The user should RTFM as needed.

That said, what you need to do is parse the pod.

From my own embarrassing hack ( LEOCHARRE::CLI2 is decent) :

# BEIGN HELP , USAGE, MAN ETC sub main::man { if( defined $main::usage ){ my $output = $main::usage; print STDERR "$output\n"; } elsif( defined &main::usage ){ my $output = main::usage(); print STDERR "$output\n"; } else { my $name = main::_scriptname(); print `man $name`; } exit; } # END HELP sub main::_scriptname{ my $name = $0 or return; $name=~s/^.+\///; return $name; }

Of course, you need to take this further, you need to actually parse the pod.. Look into PPI- Maybe PPI can help isolate the pod, and you can pick at it with something like Pod::Simple::SimpleTree