perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r178246 - /perl/Apache-Test/trunk/lib/Apache/Test.pm
Date Tue, 24 May 2005 18:53:22 GMT
Author: stas
Date: Tue May 24 11:53:21 2005
New Revision: 178246

URL: http://svn.apache.org/viewcvs?rev=178246&view=rev
Log:
fix the logic of hanlding .c have_module directly, as the previoius commit wasn't 
adding the skip reason

Modified:
    perl/Apache-Test/trunk/lib/Apache/Test.pm

Modified: perl/Apache-Test/trunk/lib/Apache/Test.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/Test.pm?rev=178246&r1=178245&r2=178246&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/Test.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/Test.pm Tue May 24 11:53:21 2005
@@ -285,16 +285,19 @@
                 push @reasons, $cfg->{cmodules_disabled}->{$mod};
                 next;
             }
-            # if the module was explicitly passed with a .c extension,
-            # do not try to eval it as a Perl module
-            return 0 if /\.c$/
         }
         die "bogus module name $_" unless /^[\w:.]+$/;
-        eval "require $_";
-        #print $@ if $@;
-        if ($@) {
-            push @reasons, "cannot find module '$_'";
+
+        # if the module was explicitly passed with a .c extension,
+        # do not try to eval it as a Perl module
+        my $not_found = 1;
+        unless (/\.c$/) {
+            eval "require $_";
+            $not_found = 0 unless $@;
+            #print $@ if $@;
         }
+        push @reasons, "cannot find module '$_'" if $not_found;
+
     }
     if (@reasons) {
         push @SkipReasons, @reasons;



Mime
View raw message