Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 76258 invoked from network); 6 Nov 2003 19:40:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 Nov 2003 19:40:25 -0000 Received: (qmail 60193 invoked by uid 500); 6 Nov 2003 19:40:16 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 60115 invoked by uid 500); 6 Nov 2003 19:40:15 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 60066 invoked from network); 6 Nov 2003 19:40:14 -0000 Received: from unknown (HELO mail.logilune.com) (195.154.174.52) by daedalus.apache.org with SMTP; 6 Nov 2003 19:40:14 -0000 Received: from stason.org (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id 6C4F8796F3; Thu, 6 Nov 2003 20:40:17 +0100 (CET) Message-ID: <3FAAA3E0.1020606@stason.org> Date: Thu, 06 Nov 2003 11:41:20 -0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Randy Kobes Cc: dev@perl.apache.org Subject: Re: [mp2] including a Win32 apxs? References: <3FA9DE01.4060401@stason.org> <3FAA10D1.4050906@stason.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Randy Kobes wrote: very neat! A few more comments: > ========================================================= > Index: Makefile.PL > =================================================================== [...] > +sub fetch_apxs { > + my $prefix = $build->{MP_AP_PREFIX} || ''; > + my $script = catfile($build->{cwd}, 'build', 'fetch_win32_apxs.pl'); > + my @args = ($^X, $script, "--with-apache2=$prefix"); > + system(@args) == 0 or die "system @args failed: $?"; > } can you please call it win32_fetch_apxs, or fetch_apxs_win32, or similar and probably add a short comment before it explaining why is it needed. > +my $dir = 'apxs'; > +my $arc = Archive::Tar->new($file, 1); > +$arc->extract($arc->list_files()); > +die "Unpacking $file failed" unless (-d $dir); > + > +print "chdir $dir\n"; > +chdir $dir or die "chdir to $dir failed: $!"; > + > +my @args = ($^X, 'Configure.pl', "--with-apache2=$prefix"); > +print "@args\n"; > +system(@args) == 0 or die "system @args failed: $?"; > + > +chdir '..'; just to avoid problems in the future it's the best to store cwd before chdir and at the end to chdir back to that stored $cwd, instead of hardcoding '..', so if later you decide to change 'apxs' with 'whatever/apxs' it'll still work just fine. __________________________________________________________________ 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