PrePAN

Sign in to PrePAN

lib::vendor add vendor libraries to the module search path

Author
rkleemann@github
Date
URL
Status
In Review
Good

Synopsis

  # Include only $FindBin::RealBin/../lib in module search path.
  use lib::vendor;

or

  # Include in module search path:
  # $FindBin::RealBin/../lib,
  # $FindBin::RealBin/../vendor/core/lib 
  use lib::vendor qw(core);

or

  # Include in module search path:
  # $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);

Description

Locates the full path to the script home and adds its lib directory to the library search path, plus any vendor library directories specified.

Comments

I'm aware of lib, mylib, and FindBin. Are there any other libraries that make adding a set of vendor libraries as painless?
https://github.com/rkleemann/lib--vendor

Please sign up to post a review.