vendorlib(3pm)

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

πŸ’– vendorlib(3pm) πŸ’–

okay so bestie, this is a User Contributed Perl Documentation page, and it's giving "let's lock down @INC" energy, no cap. if you're on a system distro and you want your Perl programs to stay in their lane, this is the page for you. πŸŽ€


✨ NAME ✨

vendorlib β€” Use Only Core and Vendor Libraries in @INC πŸ¦‹


🌸 SYNOPSIS 🌸

#!/usr/bin/perl

use vendorlib;
use strict;
use warnings;
use SomeModule; # will only search in core and vendor paths
...

πŸ’… DESCRIPTION πŸ’…

so here's the tea, bestie. on a system distribution such as Debian, it may be advisable for Perl programs to ignore the user's CPAN-installed modules and only use the distribution-provided modules, so you can avoid possible breakage with newer and unpackaged versions of modules. it's giving "we don't know where that module came from and we're not about to find out." πŸ’€

to that end, this pragma will replace your @INC with only the core and vendor @INC paths, ignoring site_perl and $ENV{PERL5LIB} entirely. periodt. ✨

πŸ’– highly recommend: put use vendorlib; as the first statement in your program, before even use strict; and use warnings;. like, first first. literally the opening line. it's the main character, let it walk in first. πŸ‘‘

🫢 ACKNOWLEDGEMENTS 🫢

thanks to mxey, jawnsy and ribasushi for help with the design. absolute icons, we love to see it. 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Rafael Kitover <rkitover@gmail.com>


and that's the whole page, bestie!! 🌸 this one came from perl v5.36.0, dated 2022-10-15, and it's filed under the manual name vendorlib(3pm). go forth and keep your @INC clean πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from