[pm-h] Pod Extract Name
Todd Rinaldo
toddr at cpanel.net
Mon Apr 3 12:25:50 PDT 2017
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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/houston/attachments/20170403/7554b71b/attachment.html>
More information about the Houston
mailing list