SPUG: dynamic 'use lib'

Dean Hudson dean at ero.com
Wed Mar 6 19:38:08 CST 2002


On Wed, Mar 06, 2002 at 05:23:54PM -0800, Aaron Paul wrote:
> 
> sorry, that's:
> 
> my $libdir = "/path/to/libs";
> require "$libdir/library.pl";

Or even:

my $lib = $ARGV[0] || "foo.pl";
require $lib if (-e $lib);

dean.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org





More information about the spug-list mailing list