]> git.vpit.fr Git - perl/modules/Sub-Op.git/commitdiff
Don't croak if Sub::Op::Test's Makefile.PL couldn't find the blib dir for Sub::Op
authorVincent Pit <vince@profvince.com>
Fri, 1 Jan 2010 16:56:15 +0000 (17:56 +0100)
committerVincent Pit <vince@profvince.com>
Fri, 1 Jan 2010 16:56:15 +0000 (17:56 +0100)
t/Sub-Op-Test/Makefile.PL

index b25c324cc6f97537e1d60816e380a2c85a2d2953..b75f2063c693287219c3a47dfd0ef33f93262a27 100644 (file)
@@ -20,11 +20,15 @@ BEGIN {
 
 use ExtUtils::Depends;
 
-use blib $top;
+my %ed_vars = eval {
+ require blib;
+ blib->import($top);
 
-my $ed = ExtUtils::Depends->new($name => 'Sub::Op');
+ my $ed = ExtUtils::Depends->new($name => 'Sub::Op');
+
+ $ed->get_makefile_vars;
+};
 
-my %ed_vars = $ed->get_makefile_vars;
 $ed_vars{clean}->{FILES} .= ' ' . join ' ',
       "$dist-*", qw{*.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt};