PFCAT(1)
π PFCAT(1) β like, the manual page, but make it make sense π
okay bestie, so this is pfcat, and it lives in the User Contributed Perl Documentation section of your man pages. she's a little script, she's iconic, let's get into it β¨
β¨ NAME β¨
pfcat β literally just greps function definitions out of perlfunc. that's the whole vibe. no cap π«Ά
πΈ DESCRIPTION πΈ
so here's the tea β β this program uses the podgrep program to go search your configuration's perlfunc for function definitions. it's giving "ctrl+F but make it perl" and honestly? obsessed. π
she's also super chill about flags:
- it honors a
-fflag to format the output throughpod2textβ so you get the pretty, human-readable version instead of the raw POD situation. - it honors a
-pflag to send the output through the pager β so you're not just scrolling forever in your terminal like some kind of feral gremlin.
and the lowkey funny part? (actually, it just passes these to podgrep.) like, she's not doing the heavy lifting herself, she's just the middlewoman, and honestly? respect. π
π EXAMPLES π
here's where it gets good, bestie. the receipts:
$ pfcat seek
(find all seek functions (including sysseek))
$ pfcat -pf sprintf
(sprintf function is formated and sent to pager)
$ pfcat -f '\bint\b'
/usr/local/devperl/lib/5.00554/pod/perlfunc.pod chunk 506
int EXPR
int
Returns the integer portion of EXPR. If EXPR is omitted, uses
`$_'. You should not use this for rounding, because it truncates
towards `0', and because machine representations of floating point
numbers can sometimes produce counterintuitive results. Usually
`sprintf()' or `printf()', or the `POSIX::floor' or `POSIX::ceil'
functions, would serve you better.
so yeah β pfcat seek finds all the seek functions (including sysseek, because she's thorough π
), and pfcat -pf sprintf gets you the sprintf function, formatted and sent to the pager. chef's kiss. π
and bestie, you can also run this using alternate perl binaries, like so:
$ oldperl -S pfcat open
....
it's giving "running the same slay script on a different perl" and yes, it absolutely ate. π₯
π¦ SEE ALSO π¦
podgrep(1)β the bestie that does the actual work, iykyk π
π AUTHORS and COPYRIGHTS π
Copyright (C) 1999 Tom Christiansen.
Copyright (C) 2006-2014 Mark Leighton Fisher.
like, thank you legends for your service π«Άβ¨
π§ LICENSE π§
This is free software; you can redistribute it and/or modify it under the terms of either:
- the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
- the Perl "Artistic License".
(This is the Perl 5 licensing scheme.)
β οΈ okay so important note, don't skip this one: please note this is a change from the originalpmtools-1.00(still available on CPAN), aspmtools-1.00were licensed only under the Perl "Artistic License". so like, the licensing got a glow-up. π
okay that's the whole page, you're officially educated, go forth and grep π
signing off β this page is from perl v5.32.1, dated 2022-01-21 π mwah, love u, bye! π
π¦ where this page comes from
- epel 9: perl-pmtools 2.2.0-14.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms