| 1 |
NAME |
| 2 |
|
| 3 |
vendorlib - Use Only Core and Vendor Libraries in @INC |
| 4 |
|
| 5 |
SYNOPSIS |
| 6 |
|
| 7 |
#!/usr/bin/perl |
| 8 |
|
| 9 |
use vendorlib; |
| 10 |
use strict; |
| 11 |
use warnings; |
| 12 |
use SomeModule; # will only search in core and vendor paths |
| 13 |
... |
| 14 |
|
| 15 |
DESCRIPTION |
| 16 |
|
| 17 |
In a system distribution such as Debian, it may be advisable for Perl |
| 18 |
programs to ignore the user's CPAN-installed modules and only use the |
| 19 |
distribution-provided modules to avoid possible breakage with newer and |
| 20 |
unpackaged versions of modules. |
| 21 |
|
| 22 |
To that end, this pragma will replace your @INC with only the core and |
| 23 |
vendor @INC paths, ignoring site_perl and $ENV{PERL5LIB} entirely. |
| 24 |
|
| 25 |
It is recommended that you put use vendorlib; as the first statement in |
| 26 |
your program, before even use strict; and use warnings;. |
| 27 |
|
| 28 |
ACKNOWLEDGEMENTS |
| 29 |
|
| 30 |
Thanks to mxey, jawnsy and ribasushi for help with the design. |
| 31 |
|
| 32 |
AUTHOR |
| 33 |
|
| 34 |
Rafael Kitover <[email protected]> |
| 35 |
|