Skip Menu |
 

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 47755
Status: open
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: jkeenan [...] cpan.org
rlucas [...] rlucas.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id B698B19B81D7 for <bug-PathTools [...] rt.cpan.org>; Thu, 9 Jul 2009 16:53:27 -0400 (EDT)
Received: (qmail 30523 invoked by uid 103); 9 Jul 2009 20:53:27 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 9 Jul 2009 20:53:27 -0000
Received: from mail-gx0-f205.google.com (HELO mail-gx0-f205.google.com) (209.85.217.205) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 09 Jul 2009 13:53:21 -0700
Received: by gxk1 with SMTP id 1so673033gxk.21 for <bug-PathTools [...] rt.cpan.org>; Thu, 09 Jul 2009 13:53:18 -0700 (PDT)
Received: by 10.151.14.5 with SMTP id r5mr1902826ybi.17.1247172798823; Thu, 09 Jul 2009 13:53:18 -0700 (PDT)
Delivered-To: cpan-bug+PathTools [...] diesel.bestpractical.com
Subject: _perl_abs_path oddly returns empty string on failure
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=HTML_MESSAGE
Return-Path: <rlucas [...] rlucas.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-PathTools [...] rt.cpan.org
Date: Thu, 9 Jul 2009 13:53:18 -0700
X-Spam-Level: *
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/alternative; boundary=000e0cd6adaaa5be51046e4c0bfc
Message-ID: <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com>
To: bug-PathTools [...] rt.cpan.org
From: Randall Lucas <rlucas [...] rlucas.net>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 1066
In Cwd.pm 3.2701, line 501, _perl_abs_path(), there are a couple of execution paths that could lead to a return ''; Specifically, if you can't stat the $start path, it carps and returns ''; unless (@cst = stat( $start )) { _carp("stat($start): $!"); return ''; } I can't see that the correct behavior is specified anywhere, but there are several other places that suggest that it should die or croak instead of returning empty. For example, in fast_abs_path, failure to -e $path gets a croak. unless (-e $path) { _croak("$path: No such file or directory"); } The reason I bring this up is that it appears that File::pushd 1.00 relies upon an eval {}; to check for the success of abs_path. On Mac OS X, abs_path ends up using the _perl_abs_path version, and returns '' without dying for a bogus directory. I am also reporting this for File::pushd, but it may be worth standardizing the behavior in Cwd so that failure dies or croaks. Mac OS X 10.5.7 (9J61) perl, v5.8.8 built for darwin-thread-multi-2level Cwd.pm 3.2701
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 1233
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=HTML_MESSAGE
In-Reply-To: <rt-3.6.HEAD-25318-1247172824-1527.47755-3-0 [...] rt.cpan.org>
References: <RT-Ticket-47755 [...] rt.cpan.org> <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com> <rt-3.6.HEAD-25318-1247172824-1527.47755-3-0 [...] rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Message-ID: <7d5145af0907091505x57d33bb6ud00e258638578d1a [...] mail.gmail.com>
Content-Type: multipart/alternative; boundary=000e0cd3f070db3cfb046e4d0d64
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id CD79719B81D7 for <bug-PathTools [...] rt.cpan.org>; Thu, 9 Jul 2009 18:05:39 -0400 (EDT)
Received: (qmail 13463 invoked by uid 103); 9 Jul 2009 22:05:39 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 9 Jul 2009 22:05:39 -0000
Received: from mail-gx0-f205.google.com (HELO mail-gx0-f205.google.com) (209.85.217.205) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 09 Jul 2009 15:05:33 -0700
Received: by gxk1 with SMTP id 1so747145gxk.21 for <bug-PathTools [...] rt.cpan.org>; Thu, 09 Jul 2009 15:05:31 -0700 (PDT)
Received: by 10.150.217.18 with SMTP id p18mr1963873ybg.258.1247177130850; Thu, 09 Jul 2009 15:05:30 -0700 (PDT)
Delivered-To: cpan-bug+PathTools [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #47755] AutoReply: _perl_abs_path oddly returns empty string on failure
Return-Path: <rlucas [...] rlucas.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-PathTools [...] rt.cpan.org
Date: Thu, 9 Jul 2009 15:05:30 -0700
X-Spam-Level: *
To: bug-PathTools [...] rt.cpan.org
From: Randall Lucas <rlucas [...] rlucas.net>
RT-Message-ID: <rt-3.6.HEAD-25318-1247177149-1726.47755-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: utf-8
Content-Length: 267
Download (untitled) / with headers
text/plain 267b
For reference, I've more fully explained the downstream problem in File::pushd that arises due to this behavior in [rt.cpan.org #47759]. I've also addressed that particular bug with a patch that fixes File::pushd to work OK even with the _perl_abs_path issue as-is.
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 335
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-25318-1247177149-1726.47755-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-47755 [...] rt.cpan.org> <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com> <rt-3.6.HEAD-25318-1247172824-1527.47755-3-0 [...] rt.cpan.org> <7d5145af0907091505x57d33bb6ud00e258638578d1a [...] mail.gmail.com> <rt-3.6.HEAD-25318-1247177149-1726.47755-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-29435-1385257871-1412.47755-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 428
Download (untitled) / with headers
text/plain 428b
On Thu Jul 09 18:05:49 2009, rlucas@rlucas.net wrote: Show quoted text
> For reference, I've more fully explained the downstream problem in > File::pushd that arises due to this behavior in [rt.cpan.org #47759]. I've > also addressed that particular bug with a patch that fixes File::pushd to > work OK even with the _perl_abs_path issue as-is.
Are there issues that still need to be addressed in this ticket? Thank you very much. Jim Keenan
From rlucas [...] rlucas.net Sun Nov 24 17: 23:40 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.9 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5] autolearn=ham
In-Reply-To: <rt-4.0.18-29435-1385257871-848.47755-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-47755 [...] rt.cpan.org> <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com> <rt-3.6.HEAD-25318-1247172824-1527.47755-3-0 [...] rt.cpan.org> <7d5145af0907091505x57d33bb6ud00e258638578d1a [...] mail.gmail.com> <rt-3.6.HEAD-25318-1247177149-1726.47755-6-0 [...] rt.cpan.org> <rt-4.0.18-29435-1385257871-848.47755-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.224.151.79 with SMTP id b15mr9757347qaw.28.1385331809197; Sun, 24 Nov 2013 14:23:29 -0800 (PST)
Message-ID: <CAHL9ZMxp+AsaH4WUK2SESEbk9J=ztaz-pAjC0oFeC2Cj4hjGjQ [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 7D93124096A for <cpan-bug+PathTools [...] hipster.bestpractical.com>; Sun, 24 Nov 2013 17:23:40 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XrdkSyjR8zJR for <cpan-bug+PathTools [...] hipster.bestpractical.com>; Sun, 24 Nov 2013 17:23:38 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id AEC02240967 for <bug-PathTools [...] rt.cpan.org>; Sun, 24 Nov 2013 17:23:38 -0500 (EST)
Received: (qmail 7559 invoked by alias); 24 Nov 2013 22:23:37 -0000
Received: from mail-qe0-f43.google.com (HELO mail-qe0-f43.google.com) (209.85.128.43) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 24 Nov 2013 14:23:33 -0800
Received: by mail-qe0-f43.google.com with SMTP id 2so3052316qeb.2 for <bug-PathTools [...] rt.cpan.org>; Sun, 24 Nov 2013 14:23:29 -0800 (PST)
Received: by 10.224.65.3 with HTTP; Sun, 24 Nov 2013 14:23:29 -0800 (PST)
Delivered-To: cpan-bug+PathTools [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #47755] _perl_abs_path oddly returns empty string on failure
Return-Path: <rlucas [...] rlucas.net>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+PathTools [...] hipster.bestpractical.com
X-RT-Mail-Extension: pathtools
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=YjgFM2RNtf1cx6xYg4DnE9Edjx1UiY1fVRmCn0OSz+0=; b=I8KcNNX7tWNWTtrkdYVvtTMkMM6njOM/Bs1HylWjx4IHt08KHF843GvFUvy33CiGjm xmJEP9SOjCXuF0wlfZJo27txL7YrYh+h/vhTly5qbqg3EgqNfY6LbEs1Fwd0RP/UFKYI fF4zv4ojPjdQHOAe+w3Hg2IVZD2pbYeLcgE3JxEoCFUxxnG/NXJen/G6EwcgxO0Oze9i WryIeqOT3HVZf/D3cSvB3utTGm6+vC5pEu3Quub0y0iwOYukrHU0FShhcH/dx7SxI2Ss krAqfB3uo9ryyq2zTJ1h0/Bs1FQy9yMRn9rGmhMDYels23yvNx1dcWh5rWQMRmGXqhkl VtPw==
Date: Sun, 24 Nov 2013 14:23:29 -0800
X-Spam-Level:
To: bug-PathTools [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
X-GM-Message-State: ALoCoQkuIGSOTxQ3plM4b4JjjFyBzRkMAQlqgnyQgwcmoQLinL33qE9/67pIUBmAvagEibxVwPNa
From: Randall Lucas <rlucas [...] rlucas.net>
RT-Message-ID: <rt-4.0.18-27179-1385331821-678.47755-0-0 [...] rt.cpan.org>
Content-Length: 1107
Jim, I haven't worked with the software in question for several years now.  I just took a peek at Cwd.pm and _perl_abs_path still deals with problems by returning ''. The other *abs_path approaches tend to croak or die instead. This should probably be harmonized to prevent portability surprises, like I had with code up the stack (File::pushd) stopping working on a different platform due to different abs_path implemetation failing differently. But no, nothing pressingly broken for me. Best, Randall On Sat, Nov 23, 2013 at 5:51 PM, James E Keenan via RT <bug-PathTools@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47755 > > > On Thu Jul 09 18:05:49 2009, rlucas@rlucas.net wrote:
>> For reference, I've more fully explained the downstream problem in >> File::pushd that arises due to this behavior in [rt.cpan.org #47759]. I've >> also addressed that particular bug with a patch that fixes File::pushd to >> work OK even with the _perl_abs_path issue as-is.
> > > Are there issues that still need to be addressed in this ticket? > > Thank you very much. > Jim Keenan
MIME-Version: 1.0
In-Reply-To: <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-4869-1386805410-93.47755-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 160
Download (untitled) / with headers
text/plain 160b
The other problem is that the perl version returns the empty string whereas the XS version of abs_path returns undef, so the API isn't consistent there, either.
MIME-Version: 1.0
In-Reply-To: <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-16227-1387120098-203.47755-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 215
Download (untitled) / with headers
text/plain 215b
+1, just ran into this too. On Fri Jul 10 00:53:44 2009, rlucas@rlucas.net wrote: Show quoted text
> In Cwd.pm 3.2701, line 501, _perl_abs_path(), there are a couple of > execution paths that could lead to a > > return ''; >
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-16227-1387120098-203.47755-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <7d5145af0907091353n177da624r53d5619c41a80d0d [...] mail.gmail.com> <rt-4.0.18-16227-1387120098-203.47755-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-16811-1387450829-923.47755-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 583
Download (untitled) / with headers
text/plain 583b
another problem that _perl_abs_path do this: # probably a permissions issue. Try the native command. require File::Spec; return File::Spec->rel2abs( $start, _backtick_pwd() ); which will return correct (sometimes?) directory absolute path. but this path will be unreadable, thus unexisting. On Sun Dec 15 19:08:18 2013, vsespb wrote: Show quoted text
> +1, just ran into this too. > > On Fri Jul 10 00:53:44 2009, rlucas@rlucas.net wrote:
> > In Cwd.pm 3.2701, line 501, _perl_abs_path(), there are a couple of > > execution paths that could lead to a > > > > return ''; > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.