You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@ectoplasm.org> on 2004/09/20 23:05:03 UTC
[Patch mp2] Searching for apu-config in srclib/apr-util
When looking for apr-config/apu-config in httpd's source tree, look
both in srclib/apr and srclib/apr-util
--
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Re: [Patch mp2] Searching for apu-config in srclib/apr-util
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
>
>> When looking for apr-config/apu-config in httpd's source tree, look
>> both in srclib/apr and srclib/apr-util
>
>
> +1 on the concept, but it'd be nice to rewrite this section. That $_
> is not the most beautiful part of it. I think using
>
> for my $base (grep defined $_, $self->dir)
> ...
> push @tries
>
> or something like that will make the code more readable
>
Yes, you're right. The following patch was checked-in instead. Much leaner
if ($self->httpd_is_source_tree) {
- push @tries, grep { -d $_ }
- map catdir($_, "srclib", "apr"),
- grep defined $_, $self->dir;
+ for my $base (grep defined $_, $self->dir) {
+ push @tries, grep -d $_,
+ map catdir($base, "srclib", $_), qw(apr apr-util);
+ }
Re: [Patch mp2] Searching for apu-config in srclib/apr-util
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> When looking for apr-config/apu-config in httpd's source tree, look
> both in srclib/apr and srclib/apr-util
+1 on the concept, but it'd be nice to rewrite this section. That $_ is
not the most beautiful part of it. I think using
for my $base (grep defined $_, $self->dir)
...
push @tries
or something like that will make the code more readable
> ------------------------------------------------------------------------
>
> When looking for apr-config/apu-config in httpd's source tree, look
> both in srclib/apr and srclib/apr-util
>
> Index: lib/Apache/Build.pm
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
> retrieving revision 1.179
> diff -u -I$Id -r1.179 Build.pm
> --- lib/Apache/Build.pm 18 Sep 2004 23:27:39 -0000 1.179
> +++ lib/Apache/Build.pm 20 Sep 2004 20:43:04 -0000
> @@ -984,7 +984,11 @@
> my @tries = ();
> if ($self->httpd_is_source_tree) {
> push @tries, grep { -d $_ }
> - map catdir($_, "srclib", "apr"),
> + map {
> + my $base = $_;
> + map { catdir($base, "srclib", $_) }
> + qw(apr apr-util)
> + }
> grep defined $_, $self->dir;
> }
> else {
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
--
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org