perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r178233 - in /perl/Apache-Test/trunk: Changes lib/Apache/Test.pm
Date Tue, 24 May 2005 18:35:48 GMT
Author: stas
Date: Tue May 24 11:35:48 2005
New Revision: 178233

URL: http://svn.apache.org/viewcvs?rev=178233&view=rev
Log:
adjust need_module()/have_module() to not try to require a module if
it was explicitly passed with a .c extension. in certain cases this
prevents a fatal error (e.g. trying to call
Apache::Test::have_module('mod_alias.c') from the <Perl>
sections.

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

Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/Changes?rev=178233&r1=178232&r2=178233&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Tue May 24 11:35:48 2005
@@ -8,6 +8,12 @@
 
 =item 1.25-dev
 
+adjust need_module()/have_module() to not try to require a module if
+it was explicitly passed with a .c extension. in certain cases this
+prevents a fatal error (e.g. trying to call
+Apache::Test::have_module('mod_alias.c') from the <Perl>
+sections. [Stas]
+
 
 
 =item 1.24 - May 20, 2005

Modified: perl/Apache-Test/trunk/lib/Apache/Test.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/Test.pm?rev=178233&r1=178232&r2=178233&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/Test.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/Test.pm Tue May 24 11:35:48 2005
@@ -285,6 +285,9 @@
                 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 $_";



Mime
View raw message