You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2004/12/13 19:13:29 UTC
Apache-Test/Makefile.PL r105822
Geoff,
This change:
http://svn.apache.org/viewcvs.cgi/httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL?rev=105822&r1=105299&r2=105822&diff_format=h
adding:
if ($ExtUtils::MakeMaker::VERSION < 6.06) {
# now that we're using subversion, make sure that
# .svn directories are skipped during the build process
# for old versions of MakeMaker
sub MY::libscan {
my $self = shift;
my $path = shift;
return '' if $path =~ /\B\.svn\b/;
return $path;
}
}
doesn't seem to be right. sub is a compile time directive, so putting it
in a conditional doesn't prevent from it being compiled:
% perl -le 'if ($_ == 1) { sub a { print "a" } }; a()'
a
Moreover it now introduces a warning in mp2 build
Subroutine MY::libscan redefined at ./Makefile.PL line 148.
so we need to do the usual ugly workaround for MM :(
Can you fix those? I can do it if you don't have the time.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache-Test/Makefile.PL r105822
Posted by Stas Bekman <st...@stason.org>.
Actually I think it's simpler than what I thought. Since the workaround is
needed when build A-T alone, this should do the trick. Could you please
test that it still does what it's supposed to do?
Index: Apache-Test/Makefile.PL
===================================================================
--- Apache-Test/Makefile.PL (revision 111732)
+++ Apache-Test/Makefile.PL (working copy)
@@ -140,12 +140,12 @@
}
}
-if ($ExtUtils::MakeMaker::VERSION < 6.06) {
+if (TOP_LEVEL && $ExtUtils::MakeMaker::VERSION < 6.06) {
# now that we're using subversion, make sure that
# .svn directories are skipped during the build process
# for old versions of MakeMaker
- sub MY::libscan {
+ *MY::libscan = sub {
my $self = shift;
my $path = shift;
@@ -153,7 +153,7 @@
return '' if $path =~ /\B\.svn\b/;
return $path;
- }
+ };
}
sub MY::postamble {
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache-Test/Makefile.PL r105822
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>doesn't seem to be right. sub is a compile time directive, so putting it
>>in a conditional doesn't prevent from it being compiled:
>
>
> indeed. guess I wasn't thinking, which seems to be happening lots lately.
No worries :) There is a way too many things to think about.
>>Moreover it now introduces a warning in mp2 build
>>Subroutine MY::libscan redefined at ./Makefile.PL line 148.
>
>
> ugh.
>
>
>>so we need to do the usual ugly workaround for MM :(
>
>
> usual?
I mean usual MM namespace workarounds, not specific to A-T :(
>>Can you fix those? I can do it if you don't have the time.
>
>
> well, I don't really have the time, but since it's my problem I'll take care
> of it. that is, if you can tell me exactly what needs to be done - I would
> probably just put the if logic inside the sub, but I suspect there needs to
> be more than that for mod_perl's sake?
to make the sub definition runtime, you just use:
*MY::foo = sub ...;
but unrelated we need to workaround with colliding identical function in mp2.
I'll take care of it.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache-Test/Makefile.PL r105822
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> doesn't seem to be right. sub is a compile time directive, so putting it
> in a conditional doesn't prevent from it being compiled:
indeed. guess I wasn't thinking, which seems to be happening lots lately.
> Moreover it now introduces a warning in mp2 build
> Subroutine MY::libscan redefined at ./Makefile.PL line 148.
ugh.
>
> so we need to do the usual ugly workaround for MM :(
usual?
>
> Can you fix those? I can do it if you don't have the time.
well, I don't really have the time, but since it's my problem I'll take care
of it. that is, if you can tell me exactly what needs to be done - I would
probably just put the if logic inside the sub, but I suspect there needs to
be more than that for mod_perl's sake?
--Geoff