5 blib - Use MakeMaker's uninstalled version of a package
9 perl -Mblib script [args...]
11 perl -Mblib=dir script [args...]
15 Looks for MakeMaker-like I<'blib'> directory structure starting in
16 I<dir> (or current directory) and working back up to five levels of '..'.
18 Intended for use on command line with B<-M> option as a way of testing
19 arbitary scripts against an uninstalled version of a package.
21 However it is possible to :
27 etc. if you really must.
31 Pollutes global name space for development only task.
35 Nick Ing-Simmons nik@tiuk.ti.com
41 use vars qw($VERSION $Verbose);
49 if ($^O eq 'VMS') { ($dir = VMS::Filespec::unixify($dir)) =~ s-/\z--; }
55 $dir = '.' unless ($dir);
56 die "$dir is not a directory\n" unless (-d $dir);
61 my $blib = "${dir}/blib";
62 if (-d $blib && -d "$blib/arch" && -d "$blib/lib")
64 unshift(@INC,"$blib/arch","$blib/lib");
65 warn "Using $blib\n" if $Verbose;
70 die "Cannot find blib even in $dir\n";