lib::vendor - add vendor libraries to the module search path (@INC)
version 0.14.163
# Include only $FindBin::RealBin/../lib in module search path (@INC). use lib::vendor;
or
# Include in module search path (@INC): # $FindBin::RealBin/../lib, # $FindBin::RealBin/../vendor/core/lib use lib::vendor qw(core);
# Include in module search path (@INC): # $FindBin::RealBin/../lib, # $FindBin::RealBin/../vendor/core/lib, # $FindBin::RealBin/../vendor/common/lib, # $FindBin::RealBin/../vendor/mongodb/lib, # $FindBin::RealBin/../vendor/rabbitmq/lib use lib::vendor qw(core common mongodb rabbitmq);
# Do nothing use lib::vendor ();
Locates the full path to the script home and adds its lib directory to the library search path, plus any vendor library directories specified.
The script home is the directory closest to the original script which has a lib subdirectory. It first searches the directory that the script was executed from, then upwards until it finds a directory containing a lib subdirectory.
lib
There is an optional configuration value of -vendor, which will configure what the vendor directory is.
-vendor
use lib::vendor -vendor => 'include', qw( this that ); # Include in module search path (@INC): # $FindBin::RealBin/../lib, # $FindBin::RealBin/../include/this, # $FindBin::RealBin/../include/that use lib::vendor -vendor => '', qw( this that ); # Include in module search path (@INC): # $FindBin::RealBin/../lib, # $FindBin::RealBin/../this, # $FindBin::RealBin/../that
Please report any bugs or feature requests on the bugtracker website https://github.com/rkleemann/lib-vendor/issues or by email to bug-lib-vendor@rt.cpan.org.
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
lib, mylib, FindBin
Bob Kleemann <bobk@cpan.org>
This software is Copyright (c) 2014 by Bob Kleemann.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install lib::vendor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm lib::vendor
CPAN shell
perl -MCPAN -e shell install lib::vendor
For more information on module installation, please visit the detailed CPAN module installation guide.