You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by st...@apache.org on 2005/05/24 20:35:48 UTC
svn commit: r178233 - in /perl/Apache-Test/trunk: Changes lib/Apache/Test.pm
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 $_";