On Nov 16, 2004, at 10:58 PM, Michael G Schwern wrote:

On Tue, Nov 16, 2004 at 10:22:51PM -0600, Ken Williams wrote:
I don't have a 5.005 perl to test against ATM - would the following
patch work around that syntax error?

No, you've only got two args to play with. This is the equivalent 5.005-ism.

    open(REALPATH, "-|") || exec '/usr/bin/fullpath', '-t', $path;


Thanks. That'll go in the next release, due shortly:

===================================================================
RCS file: /Users/ken/src/CVS-repository/modules/PathTools/Cwd.pm,v
retrieving revision 1.3
diff -u -r1.3 Cwd.pm
--- Cwd.pm      2004/11/17 04:37:22     1.3
+++ Cwd.pm      2004/11/17 05:11:45
@@ -652,7 +652,7 @@
     my $path = @_ ? shift : '.';
     local *REALPATH;

- open(REALPATH, '-|', '/usr/bin/fullpath', '-t', $path) or
+ defined( open(REALPATH, '-|') || exec '/usr/bin/fullpath', '-t', $path ) or
die "Can't open /usr/bin/fullpath: $!";
my $realpath = <REALPATH>;
close REALPATH;
===================================================================



-Ken



Reply via email to