PMEXP(1p)

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

πŸ’– PMEXP(1p) πŸ’–

okay bestie, welcome to pmexp β€” it's a lil tool from the User Contributed Perl Documentation corner of the manual, and it's genuinely so useful it's not even funny. sit down, grab a strawberry πŸ“, let's go.


✨ NAME ✨

pmexp β€” it shows you a module's exports. that's it. that's the whole vibe. πŸ‘‘


🌸 DESCRIPTION 🌸

so here's the tea: you hand this program a module name, and it goes and figures out exactly what that module is throwing at you. specifically, it identifies:

  • the symbols that get automatically exported β€” those live in that package's @EXPORT πŸŽ€
  • the symbols that are optionally exported β€” those hang out in the package's @EXPORT_OK ✨
  • and it also lists out the import groups, which are chillin' in that package's %EXPORT_TAGS hash πŸ¦‹

no cap, that's the entire job. and it does it well. periodt.


🌈 EXAMPLES 🌈

here's what it actually looks like in the wild, bestie. go off:

$ pmexp Text::ParseWords
Text::ParseWords automatically exports shellwords, quotewords, nested_quotewords, and parse_line
Text::ParseWords optionally exports old_shellwords

$ pmexp Text::Wrap
Text::Wrap automatically exports wrap and fill
Text::Wrap optionally exports $columns, $break, and $huge

$ pmexp Fcntl
Fcntl automatically exports FD_CLOEXEC, F_DUPFD, F_EXLCK, F_GETFD, F_GETFL, F_GETLK, F_GETLK64, F_GETOWN, F_POSIX, F_RDLCK, F_SETFD, F_SETFL, F_SETLK, F_SETLK64, F_SETLKW, F_SETLKW64, F_SETOWN, F_SHLCK, F_UNLCK, F_WRLCK, O_ACCMODE, O_APPEND, O_ASYNC, O_BINARY, O_CREAT, O_DEFER, O_DSYNC, O_EXCL, O_EXLOCK, O_LARGEFILE, O_NDELAY, O_NOCTTY, O_NONBLOCK, O_RDONLY, O_RDWR, O_RSYNC, O_SHLOCK, O_SYNC, O_TEXT, O_TRUNC, and O_WRONLY

Fcntl optionally exports FAPPEND, FASYNC, FCREAT, FDEFER, FEXCL, FNDELAY, FNONBLOCK, FSYNC, FTRUNC, LOCK_EX, LOCK_NB, LOCK_SH, and LOCK_UN
Fcntl export tag 'Fcompat' includes FAPPEND, FASYNC, FCREAT, FDEFER, FEXCL, FNDELAY, FNONBLOCK, FSYNC, and FTRUNC
Fcntl export tag 'flock' includes LOCK_SH, LOCK_EX, LOCK_NB, and LOCK_UN

like… look at Fcntl just casually dumping that entire list of constants on you 😭 main character energy fr fr.


πŸ’€ BUGS πŸ’€

ngl the output formatting should be nicer β€” like, maybe it should be using format and write instead. that's the bug note. it's giving "we know, we know." πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€

if you're obsessed and want more, go read these:


🫢 AUTHORS and COPYRIGHTS 🫢

giving credit where credit is due, always:

  • Copyright (C) 1999 Tom Christiansen. πŸ’œ
  • Copyright (C) 2006-2014, 2018 Mark Leighton Fisher. πŸ’œ

πŸ“œ LICENSE πŸ“œ

so this is free software β€” you can redistribute it and/or modify it under the terms of either:

  1. the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
  2. the Perl "Artistic License".

(that's the Perl 5 licensing scheme, iykyk.)

⚠️ heads up bestie: please note this is a change from the original pmtools-1.00 (still available on CPAN), because pmtools-1.00 were licensed only under the Perl "Artistic License". so if you were expecting the old setup, this is not that. πŸ’…

and that's the whole page, babe. ✨ this lil gem lives in perl v5.36.0, dated 2022-10-14, filed under PMEXP(1p). go export something iconic today. πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from