lib-relative
view release on metacpan or search on metacpan
lib/lib/relative.pm view on Meta::CPAN
use warnings;
use Cwd ();
use File::Basename ();
use File::Spec ();
use lib ();
our $VERSION = '1.002';
sub import {
my ($class, @paths) = @_;
my $file = (caller)[1];
my $dir = -e $file ? File::Basename::dirname(Cwd::abs_path $file) : Cwd::getcwd;
lib->import(map { File::Spec->file_name_is_absolute($_) ? $_ : File::Spec->catdir($dir, $_) } @paths);
}
1;
=head1 NAME
lib::relative - Add paths relative to the current file to @INC
( run in 1.337 second using v1.01-cache-2.11-cpan-a3c8064c92c )