httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject Re: cvs commit: httpd-apreq-2/build xsbuilder.pl
Date Thu, 12 Jun 2003 14:13:14 GMT
On Thu, 12 Jun 2003, Stas Bekman wrote:

[ .. ]
> Understood. But using FindBin is better than Cwd in general, I
> believe, because it allows you to invoke the same script as
> foo/bar.pl ./bar.pl or even /full/path/to/bar.pl and using
> FindBin it'll always do the right thing, whereas it won't with
> Cwd.
>
> so perhaps doing Win32::GetLongPathName($FindBin::Bin) works?

Yes, it does, and that's a good point - thanks. How about
(for both build/xsbuilder.pl and glue/perl/t/TEST.PL):
===============================================================
Index: build/xsbuilder.pl
===================================================================
RCS file: /home/cvs/httpd-apreq-2/build/xsbuilder.pl,v
retrieving revision 1.6
diff -u -r1.6 xsbuilder.pl
--- build/xsbuilder.pl	12 Jun 2003 05:55:32 -0000	1.6
+++ build/xsbuilder.pl	12 Jun 2003 14:23:01 -0000
@@ -10,9 +10,9 @@
 use Apache::Build;
 require Win32 if Apache::Build::WIN32;

-use Cwd;
+use FindBin;
 my $cwd = Apache::Build::WIN32 ?
-    Win32::GetLongPathName(cwd) : cwd;
+    Win32::GetLongPathName($FindBin::Bin) : $FindBin::Bin;
 $cwd =~ m{^(.+httpd-apreq-2)} or die "Can't find base cvs directory";
 my $base_dir = $1;
 my $src_dir = "$base_dir/src";
Index: glue/perl/t/TEST.PL
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/TEST.PL,v
retrieving revision 1.2
diff -u -r1.2 TEST.PL
--- glue/perl/t/TEST.PL	12 Jun 2003 05:42:13 -0000	1.2
+++ glue/perl/t/TEST.PL	12 Jun 2003 14:23:01 -0000
@@ -7,9 +7,9 @@
 use Apache::Build;
 require Win32 if Apache::Build::WIN32;

-use Cwd;
+use FindBin;
 my $cwd = Apache::Build::WIN32 ?
-    Win32::GetLongPathName(cwd) : cwd;
+    Win32::GetLongPathName($FindBin::Bin) : $FindBin::Bin;
 $cwd =~ m{^(.+httpd-apreq-2)} or die "Can't find base cvs directory";
 my $base_dir = $1;
 my $env_dir = "$base_dir/env";
===================================================================

-- 
best regards,
randy

Mime
View raw message