PODGREP(1p)

πŸ“¦
version 2.2.0 Β· 4 versions
, in ubuntu noble, ubuntu questing

πŸ’– 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 the pod2text program πŸ’…
  • -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