package blib;
use Cwd;
use vars qw($VERSION);
$VERSION = '1.00';
sub import{my$package=shift;
my$dir=getcwd;
if($^O eq 'VMS'){($dir=VMS::Filespec::unixify($dir))=~s-/$--;}if(@_){$dir=shift;
$dir=~s/blib$//;
$dir=~s,/+$,,;
$dir='.' unless($dir);
die"$dir is not a directory\n" unless(-d$dir);}my$i=5;
while($i--){my$blib="${dir}/blib";
if(-d$blib&&-d"$blib/arch"&&-d"$blib/lib"){unshift(@INC,"$blib/arch","$blib/lib");
warn"Using $blib\n";
return;}$dir.="/..";}die"Cannot find blib even in $dir\n";}1;
