[pm-h] Pod Extract Name

Mark Allen mrallen1 at yahoo.com
Mon Apr 3 16:15:08 PDT 2017


Sounds like you want https://metacpan.org/pod/Pod::Simple::SimpleTree or something close to that.

In any case, Pod::Simple is the correct parent for whatever it is you want to build.
Mark

On Monday, April 3, 2017 2:27 PM, Todd Rinaldo <toddr at cpanel.net> wrote:



It depends on how regular your data is and how lazy you want to be. You could do something like this from shell:

cd $my_base_dir
for file in `grep -Rl 'head1 NAME' *`; do
echo $file `grep -A2 'head1 NAME' $file|tail -1`
done




On Mar 31, 2017, at 2:41 PM, Michael R. Davis <mrdvt92 at yahoo.com> wrote:
>
>Houston PMs,
>I need to pull the pod NAME for all of my .pm files for a report.  There are so many POD this and that's on CPAN that I cannot find a pod parser that is simply like this.
>
>
>my $pod = XXX->new(file=>"xxx.pm");
>my $name = $pod->name; #or $pod->head1("NAME");
>
>
>Where $name would pull the "content" from the pod NAME section.
>
>
>=head1 NAME
>
>
>
>content
>
>
>=cut
>
>
>Does anyone have a favorite POD object?
>
>Mike
>
>
>mrdvt92
>
>
>
>_______________________________________________
>Houston mailing list
>Houston at pm.org
>http://mail.pm.org/mailman/listinfo/houston
>Website: http://houston.pm.org/
_______________________________________________
Houston mailing list
Houston at pm.org
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/


More information about the Houston mailing list