Doug MacEachern wrote:
> On Sun, 7 Apr 2002, Stas Bekman wrote:
>
>
>>Yes, but how does it help with Apache::TestMM?
>
>
> well, there's a comment explains what's going on.
> and code to work around the problem.
>
>
>>Its import() already does a similar thing.
>
>
> no, that is not the same.
>
>
>>Should it unconditionaly force the aliasing? In fact
>>I've tried that, didn't seem to work.
>
>
> not sure what you tried exactly. but notice ModPerl::MM::WriteMakefile
> calls my_import(), to make it happen for each subdir Makefile.PL
> and ModPerl::MM::my_import only takes care of itself, not the functions in
> Apache::TestMM.
ok, the patch at the end solves the problem. Now any sub-dir can enjoy
from imported My::test, etc.
While debugging the problem, I've noticed that if the Makefile.PL in
sub-dirs fails, it's silently swallowed. I think it should croak. Is it
a problem with MakeMaker in general or something specific to
modperl-2.0/Makefile.PL? Most likely the former.
Index: Apache-Test/lib/Apache/TestMM.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,vretrieving
revision 1.15
diff -u -r1.15 TestMM.pm
--- Apache-Test/lib/Apache/TestMM.pm 23 Dec 2001 16:16:24 -0000 1.15
+++ Apache-Test/lib/Apache/TestMM.pm 7 Apr 2002 17:27:41 -0000
@@ -16,8 +16,9 @@
}
no strict 'refs';
my $sub = "MY::$section";
- #e.g. modperl-2.0/Makefile.PL pulls in Apache-Test/Makefile.PL
- next if defined &$sub;
+ # Force aliasing, since previous WriteMakefile might have
+ # moved it
+ undef &$sub if defined &$sub;
*$sub = \&{$section};
}
}
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]