PODGREP(1p)
π PODGREP(1p) β like, grep but it only looks at the pod β¨
okay bestie, so this is the manual for podgrep, and yes it lives in the User Contributed Perl Documentation section, and it's genuinely one of those little tools that eats π
π NAME π
podgrep β grep, but only in the pod sections. no cap.
β¨ SYNOPSIS β¨
podgrep [-i] [-p] [-f] [-h] pattern [ files ... ]
π¦ DESCRIPTION π¦
So what this program does: it goes through every single paragraph in a pod document and prints out each paragraph that matches the pattern you handed it. and here's the slay part β the pod can be mixed in with actual program code, like inside a module. it does not care. it finds the pod anyway. π
Options are:
-iβ case insensitive match. it's giving "don't be picky about capital letters" β¨-pβ pages the output through your pager π«Ά. the pager gets primed with an argument to search for the string, so your result is highlighted. literally the main character move.-fβ formats the output through thepod2textprogram π-hβ checks for matches in pod"=head"and"=item"headers alone, and keeps printing podagraphs until the next header is found π
π EXAMPLES π
the classics, fr fr:
$ podgrep mail `pmpath CGI`
(prints out podagraphs from the CGI.pm manpage that mention mail)
$ podgrep -i destructor `sitepods`
(prints out podagraphs that mention destructors in the
site-installed pods)
$ podgrep -i 'type.?glob' `stdpods`
(prints out podagraphs that mention typeglob in the
standard pods)
$ podgrep -hpfi "lock" `faqpods`
(prints out all podagraphs with "lock" in the headers
case-insensitively, then formats these with pod2text, then
shows them in the pager with matches high-lighted)
$ podgrep -fh seek `podpath perlfunc`
(prints out and formats podagraphs from the standard perlfunc manpage
whose headers or items contain "seek".)
π§ SEE ALSO π§
faqpods(1), pfcat(1), pmpath(1), pod2text(1), podpath(1), sitepods(1), stdpods(1), and tcgrep(1).
β NOTE β
for a pager, the author is obsessed with these environment settings (in the login startup, obviously, where else π):
$ENV{PAGER} = "less";
$ENV{LESS} = "MQeicsnf";
π AUTHORS and COPYRIGHTS π
Copyright (C) 1999 Tom Christiansen.
Copyright (C) 2006-2014, 2018 Mark Leighton Fisher.
π LICENSE π
this is free software; you can redistribute it and/or modify it under the terms of either: (a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or (b) the Perl "Artistic License". (this is the Perl 5 licensing scheme.)
please note this is a change from the original pmtools-1.00 (still available on CPAN), as pmtools-1.00 were licensed only under the Perl "Artistic License". π don't get it twisted!
and that's the whole page, bestie π this one's from perl v5.36.0, dated 2022-10-14, and it's still serving podgrep(1p) realness to this very day β¨ go grep some pod, you got this π«ΆπΈ
π¦ where this page comes from
- ubuntu noble: pmtools 2.2.0-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: pmtools 2.2.0-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms