MPATH(1p)

πŸ“¦
version 0.19 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– MPATH πŸ’–

omg hi bestie!! welcome to mpath (manual section 1p, from the User Contributed Perl Documentation crew) β€” okay so real talk, this little icon does ONE job and it does it flawlessly: it shows you the full path to a perl module that's installed locally on your system. no cap. that's the whole personality and honestly? iconic. πŸ’…


🌸 NAME 🌸

mpath β€” display the full path to a perl module (installed locally)

like yes bestie, that IS the name and that IS what it does, we love a self-aware queen ✨


πŸ¦‹ USAGE πŸ¦‹

mpath [OPTIONS] MODULE [MODULE ...]

one MODULE, or a whole lil squad of them separated by spaces. she's flexible like that 🫢


πŸŽ€ EXAMPLE πŸŽ€

okay lemme show you how she eats:

% mpath Module::Path
/usr/local/lib/perl5/site_perl/5.16.0/Module/Path.pm

just the path. clean. minimal. main character energy. πŸ’–

% mpath --full Module::Path
Module::Path /usr/local/lib/perl5/site_perl/5.16.0/Module/Path.pm

ooh with --full she gives you the name AND the path, like a lil name tag situation 🏷️✨

% mpath Moose Moo
/usr/local/lib/perl5/site_perl/5.16.0/darwin-2level/Moose.pm
/usr/local/lib/perl5/site_perl/5.16.0/Moo.pm

two modules in, two paths out. she's serving multitasking, periodt. πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

so like, mpath displays the full path to a perl module on the local system. it does this by using the module_path() function from Module::Path to get the path. that's the whole pipeline bestie, she's not out here reinventing anything, she's just sourcing from the good stuff. 🧚

now here's the part where you gotta pay attention: if one of the modules wasn't found, mpath will exit with the exit code 1 and print the following message. and yes, you can silence it with the option --quiet if you're the kind of girl who doesn't wanna hear bad news. πŸ™ˆ

% mpath Foo::Bar
Foo::Bar not found

or, if you're running a mixed batch where some hit and some don't:

% mpath Moose Foo::Bar
/usr/local/lib/perl5/site_perl/5.16.0/darwin-2level/Moose.pm
Foo::Bar not found

see how she still gave you the one that worked? she's not gonna punish the whole group for one flop. that's growth. that's maturity. that's a queen who knows how to separate the real ones from the missing ones. πŸ˜­πŸ’–


✨ OPTIONS ✨

  • -h, -?, --help β€” print this help message and exit. (three whole ways to ask for help, she's accommodating πŸ’…)
  • -f, --full β€” print module name. (as in, you get the name and the path, not just the path)
  • -q, --quiet β€” don't print any error when one of the module requested could not be found. (silence the sad news, live your truth ✨)

🌈 SEE ALSO 🌈

  • Module::Path

(the source of the module_path() magic, go give her a follow, iykyk 🫢)


πŸ‘‘ AUTHOR πŸ‘‘

Neil Bowers <neilb@cpan.org>


This software is copyright (c) 2012 by Neil Bowers <neilb@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


okay bestie that's the whole page, you're fully certified in mpath now, go find your modules and slay πŸ’–βœ¨

signing off with love, from perl v5.36.0 dated 2022-10-13, filed under MPATH(1p) in the User Contributed Perl Documentation. mwah πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from