Skip Menu |
 

This queue is for tickets about the File-Path CPAN distribution.

Report information
The Basics
Id: 53178
Status: resolved
Priority: 0/
Queue: File-Path

People
Owner: RICHE [...] cpan.org
Requestors: david.schmidt [...] fm5.at
Cc:
AdminCc:

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

Attachments
0001-add-a-failing-test-for-Path-Class-use.patch
0002-do-not-treat-blessed-hashes-as-argument-hashes.patch



Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 312FD4D8002 for <bug-File-Path [...] rt.cpan.org>; Mon, 28 Dec 2009 07:09:19 -0500 (EST)
Received: (qmail 21090 invoked by uid 103); 28 Dec 2009 12:09:19 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 28 Dec 2009 12:09:19 -0000
Received: from smtp-05.sil.at (HELO smtp-05.sil.at) (78.142.186.21) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Mon, 28 Dec 2009 04:09:17 -0800
Received: from mail-bw0-f209.google.com ([209.85.218.209]) by smtp-05.sil.at with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from <david.schmidt [...] fm5.at>) id 1NPEPQ-0004id-Rm for bug-File-Path [...] rt.cpan.org; Mon, 28 Dec 2009 13:09:12 +0100
Received: by bwz1 with SMTP id 1so7563617bwz.13 for <bug-File-Path [...] rt.cpan.org>; Mon, 28 Dec 2009 04:09:12 -0800 (PST)
Received: by 10.204.175.80 with SMTP id w16mr2133647bkz.207.1262002151687; Mon, 28 Dec 2009 04:09:11 -0800 (PST)
Delivered-To: cpan-bug+File-Path [...] diesel.bestpractical.com
Subject: bug when only 1 path present and no \%opts
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
Return-Path: <david.schmidt [...] fm5.at>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-File-Path [...] rt.cpan.org
Date: Mon, 28 Dec 2009 13:09:11 +0100
X-Spam-Level: *
Content-Type: text/plain; charset=UTF-8
Message-ID: <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com>
To: bug-File-Path [...] rt.cpan.org
X-Scan-Signature: 7198b07309c365c0bb33c6491e37ce8a
From: David Schmidt <david.schmidt [...] fm5.at>
X-RT-Original-Encoding: utf-8
Content-Length: 328
Download (untitled) / with headers
text/plain 328b
make_path($path); # path is not created make_path($path, {}); # path is created remove_tree($path); # path is not deleted remove_tree($path, {}); # path is deleted version 2.08 Linux kvm6 2.6.28-17-server #58-Ubuntu SMP Tue Dec 1 22:13:36 UTC 2009 x86_64 GNU/Linux Sincerely, david -- David Schmidt | http://www.fm5.at
MIME-Version: 1.0
X-Spam-Status: No, hits=3.4 required=8.0 tests=FH_DATE_PAST_20XX
In-Reply-To: <rt-3.8.HEAD-21050-1262002176-1693.53178-4-0 [...] rt.cpan.org>
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-21050-1262002176-1693.53178-4-0 [...] rt.cpan.org>
Message-ID: <4B407971.4010800 [...] landgren.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 950424D8002 for <bug-File-Path [...] rt.cpan.org>; Sun, 3 Jan 2010 06:02:56 -0500 (EST)
Received: (qmail 8821 invoked by uid 103); 3 Jan 2010 11:02:56 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 3 Jan 2010 11:02:56 -0000
Received: from profane.mongueurs.net (HELO profane.mongueurs.net) (81.80.147.194) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sun, 03 Jan 2010 03:02:54 -0800
Received: from [127.0.0.1] (localhost [127.0.0.1]) by profane.mongueurs.net (Postfix) with ESMTP id 596382E05E for <bug-File-Path [...] rt.cpan.org>; Sun, 3 Jan 2010 12:02:49 +0100 (CET)
Delivered-To: cpan-bug+File-Path [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #53178] bug when only 1 path present and no \%opts
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
Return-Path: <david [...] landgren.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-File-Path [...] rt.cpan.org
Date: Sun, 03 Jan 2010 12:03:13 +0100
X-Spam-Level: ***
To: bug-File-Path [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: David Landgren <david [...] landgren.net>
RT-Message-ID: <rt-3.8.HEAD-2387-1262516609-128.53178-0-0 [...] rt.cpan.org>
Content-Length: 828
Download (untitled) / with headers
text/plain 828b
David Schmidt via RT wrote: Show quoted text
> Mon Dec 28 07:09:35 2009: Request 53178 was acted upon. > Transaction: Ticket created by david.schmidt@fm5.at > Queue: File-Path > Subject: bug when only 1 path present and no \%opts > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: david.schmidt@fm5.at > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=53178 > > > > make_path($path); # path is not created > make_path($path, {}); # path is created > > remove_tree($path); # path is not deleted > remove_tree($path, {}); # path is deleted > > version 2.08 > Linux kvm6 2.6.28-17-server #58-Ubuntu SMP Tue Dec 1 22:13:36 UTC 2009 > x86_64 GNU/Linux > > Sincerely, david >
Gah! That's horrible! I'll see what's going on and fix that up pronto. Thanks, David
MIME-Version: 1.0
X-Spam-Status: No, hits=3.4 required=8.0 tests=FH_DATE_PAST_20XX
In-Reply-To: <rt-3.8.HEAD-21050-1262002176-1693.53178-4-0 [...] rt.cpan.org>
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-21050-1262002176-1693.53178-4-0 [...] rt.cpan.org>
Message-ID: <4B408D89.3010903 [...] landgren.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id E03074D8002 for <bug-File-Path [...] rt.cpan.org>; Sun, 3 Jan 2010 07:48:41 -0500 (EST)
Received: (qmail 21485 invoked by uid 103); 3 Jan 2010 12:28:40 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 3 Jan 2010 12:28:40 -0000
Received: from profane.mongueurs.net (HELO profane.mongueurs.net) (81.80.147.194) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sun, 03 Jan 2010 04:28:38 -0800
Received: from [127.0.0.1] (localhost [127.0.0.1]) by profane.mongueurs.net (Postfix) with ESMTP id CE1C22E065 for <bug-File-Path [...] rt.cpan.org>; Sun, 3 Jan 2010 13:28:34 +0100 (CET)
Delivered-To: cpan-bug+File-Path [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #53178] bug when only 1 path present and no \%opts
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
Return-Path: <david [...] landgren.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-File-Path [...] rt.cpan.org
Date: Sun, 03 Jan 2010 13:28:57 +0100
X-Spam-Level: ***
To: bug-File-Path [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: David Landgren <david [...] landgren.net>
RT-Message-ID: <rt-3.8.HEAD-2392-1262522969-1953.53178-0-0 [...] rt.cpan.org>
Content-Length: 876
Download (untitled) / with headers
text/plain 876b
David Schmidt via RT wrote: Show quoted text
> Mon Dec 28 07:09:35 2009: Request 53178 was acted upon. > Transaction: Ticket created by david.schmidt@fm5.at > Queue: File-Path > Subject: bug when only 1 path present and no \%opts > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: david.schmidt@fm5.at > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=53178 > > > > make_path($path); # path is not created > make_path($path, {}); # path is created > > remove_tree($path); # path is not deleted > remove_tree($path, {}); # path is deleted > > version 2.08 > Linux kvm6 2.6.28-17-server #58-Ubuntu SMP Tue Dec 1 22:13:36 UTC 2009 > x86_64 GNU/Linux
Hmm, I cannot reproduce this problem. What does $path contain at the moment of the call, and what is your cwd and the rights therein (chmod)? Thanks, David
MIME-Version: 1.0
In-Reply-To: <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com>
Content-Type: multipart/mixed; boundary="----------=_1311087252-12439-43"
Message-ID: <rt-3.8.HEAD-12439-1311087252-1838.53178-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 359
Download (untitled) / with headers
text/plain 359b
What the OP did not show was that he was probably using an object as the $path. This *is* a horrible bug, and it happens when the single argument to the routines is an object that is a blessed hash, like a Path::Class object. I have attached a test and a fix. The fix will treat only an unblessed hashref as a set of arguments, not a blessed one. -- rjbs
Subject: 0001-add-a-failing-test-for-Path-Class-use.patch
MIME-Version: 1.0
Content-Type: application/octet-stream; name="0001-add-a-failing-test-for-Path-Class-use.patch"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="0001-add-a-failing-test-for-Path-Class-use.patch"
Content-Transfer-Encoding: base64
Content-Length: 1685
From bc6516f2677387e9e82233d7c7da97350356fabd Mon Sep 17 00:00:00 2001 From: Ricardo Signes <rjbs@cpan.org> Date: Tue, 19 Jul 2011 10:39:59 -0400 Subject: [PATCH 1/2] add a failing test for Path::Class use --- t/Path-Class.t | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 t/Path-Class.t diff --git a/t/Path-Class.t b/t/Path-Class.t new file mode 100644 index 0000000..c3542d6 --- /dev/null +++ b/t/Path-Class.t @@ -0,0 +1,49 @@ +use strict; +use warnings; +use Test::More; + +eval "require Path::Class"; +plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; + +use File::Path qw(remove_tree make_path); +Path::Class->import; + +my $name = 'test'; +my $dir = dir($name); + +sub test { + my ($dir, $pass_arg) = @_; + + my $args = [ $dir, ($pass_arg ? {} : ()) ]; + my $desc = sprintf( + 'dir isa %s, second arg is %s', + (ref($dir) || 'string'), + ($pass_arg ? '{}' : 'not passed') + ); + + return ($args, $desc); +} + +for my $mk_dir ($name, dir($name)) { + for my $mk_pass_arg (0, 1) { + + for my $rm_dir ($name, dir($name)) { + for my $rm_pass_arg (0, 1) { + remove_tree($name) if -e $name; + + my ($mk_args, $mk_desc) = test($mk_dir, $mk_pass_arg); + make_path(@$mk_args); + + if (ok( -d $dir, "we made $dir ($mk_desc)")) { + my ($rm_args, $rm_desc) = test($rm_dir, $rm_pass_arg); + remove_tree(@$rm_args); + ok( ! -d $dir, "...then we removed $dir ($rm_desc)"); + } else { + fail("...can't remove it if we didn't create it"); + } + } + } + } +} + +done_testing; -- 1.7.4.4
MIME-Version: 1.0
Subject: 0002-do-not-treat-blessed-hashes-as-argument-hashes.patch
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: application/octet-stream; name="0002-do-not-treat-blessed-hashes-as-argument-hashes.patch"
Content-Disposition: inline; filename="0002-do-not-treat-blessed-hashes-as-argument-hashes.patch"
Content-Transfer-Encoding: base64
Content-Length: 1449
From 6620faa02586eb41db7deea4a12e6545150cb58a Mon Sep 17 00:00:00 2001 From: Ricardo Signes <rjbs@cpan.org> Date: Tue, 19 Jul 2011 10:46:48 -0400 Subject: [PATCH 2/2] do not treat blessed hashes as argument hashes --- Path.pm | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Path.pm b/Path.pm index 387cdb1..790405b 100644 --- a/Path.pm +++ b/Path.pm @@ -6,6 +6,7 @@ use strict; use Cwd 'getcwd'; use File::Basename (); use File::Spec (); +use Scalar::Util (); BEGIN { if ($] < 5.006) { @@ -58,13 +59,19 @@ sub _error { } } +sub __is_arg { + my ($arg) = @_; + return (Scalar::Util::reftype($arg) || '') eq 'HASH' + && ! Scalar::Util::blessed($arg); +} + sub make_path { - push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH'); + push @_, {} unless @_ and __is_arg($_[-1]); goto &mkpath; } sub mkpath { - my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH')); + my $old_style = !(@_ and __is_arg($_[-1])); my $arg; my $paths; @@ -162,7 +169,7 @@ sub _mkpath { } sub remove_tree { - push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH'); + push @_, {} unless @_ and __is_arg($_[-1]); goto &rmtree; } @@ -185,7 +192,7 @@ sub _is_subdir { } sub rmtree { - my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH')); + my $old_style = !(@_ and __is_arg($_[-1])); my $arg; my $paths; -- 1.7.4.4
From david.schmidt [...] fm5.at Tue Jul 19 15: 39:07 2011
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-3.8.HEAD-12439-1311087253-1700.53178-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-12439-1311087253-1700.53178-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <CADttTaK0Tw7ZPQT+Ldm14hHWSi44J-ARjs9BmQ6giC==8kCJvQ [...] mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
X-Scan-Signature: efbabc9c6245e282b997a89e41bb2e26
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 9B7D7240470 for <cpan-bug+File-Path [...] hipster.bestpractical.com>; Tue, 19 Jul 2011 15:39:07 -0400 (EDT)
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 wgD9300u7Rpx for <cpan-bug+File-Path [...] hipster.bestpractical.com>; Tue, 19 Jul 2011 15:39:03 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 11F9B24044B for <bug-File-Path [...] rt.cpan.org>; Tue, 19 Jul 2011 15:39:02 -0400 (EDT)
Received: (qmail 19016 invoked by uid 103); 19 Jul 2011 19:39:02 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 19 Jul 2011 19:39:01 -0000
Received: from smtp-01.sil.at (HELO smtp-01.sil.at) (78.142.186.24) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Tue, 19 Jul 2011 12:38:56 -0700
Received: from mail-gw0-f50.google.com ([74.125.83.50]) by smtp-01.sil.at with esmtpsa (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.63) (envelope-from <david.schmidt [...] fm5.at>) id 1QjG84-0000Tn-NT for bug-File-Path [...] rt.cpan.org; Tue, 19 Jul 2011 21:38:52 +0200
Received: by gwj16 with SMTP id 16so149558gwj.9 for <bug-File-Path [...] rt.cpan.org>; Tue, 19 Jul 2011 12:38:51 -0700 (PDT)
Received: by 10.91.134.7 with SMTP id l7mr7035571agn.166.1311104330972; Tue, 19 Jul 2011 12:38:50 -0700 (PDT)
Received: by 10.91.144.11 with HTTP; Tue, 19 Jul 2011 12:38:50 -0700 (PDT)
Delivered-To: cpan-bug+File-Path [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #53178] bug when only 1 path present and no \%opts
Return-Path: <david.schmidt [...] fm5.at>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+File-Path [...] hipster.bestpractical.com
X-RT-Mail-Extension: file-path
Date: Tue, 19 Jul 2011 21:38:50 +0200
X-Spam-Level:
To: bug-File-Path [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: David Schmidt <david.schmidt [...] fm5.at>
RT-Message-ID: <rt-3.8.HEAD-12437-1311104348-1038.53178-0-0 [...] rt.cpan.org>
Content-Length: 552
Download (untitled) / with headers
text/plain 552b
awesome, thanks ;) On Tue, Jul 19, 2011 at 4:54 PM, Ricardo Signes via RT <bug-File-Path@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=53178 > > > What the OP did not show was that he was probably using an object as the > $path.  This *is* a horrible bug, and it happens when the single > argument to the routines is an object that is a blessed hash, like a > Path::Class object. > > I have attached a test and a fix.  The fix will treat only an unblessed > hashref as a set of arguments, not a blessed one. > > -- > rjbs >
From david [...] landgren.net Thu Jul 21 10: 32:01 2011
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-3.8.HEAD-12437-1311104348-11.53178-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-12439-1311087253-1700.53178-6-0 [...] rt.cpan.org> <CADttTaK0Tw7ZPQT+Ldm14hHWSi44J-ARjs9BmQ6giC==8kCJvQ [...] mail.gmail.com> <rt-3.8.HEAD-12437-1311104348-11.53178-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <4E283856.7070500 [...] landgren.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
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 309412405B5 for <cpan-bug+File-Path [...] hipster.bestpractical.com>; Thu, 21 Jul 2011 10:32:01 -0400 (EDT)
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 ma4Fvax56N61 for <cpan-bug+File-Path [...] hipster.bestpractical.com>; Thu, 21 Jul 2011 10:31:56 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 2CE4B2404F7 for <bug-File-Path [...] rt.cpan.org>; Thu, 21 Jul 2011 10:31:55 -0400 (EDT)
Received: (qmail 18487 invoked by uid 103); 21 Jul 2011 14:31:55 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 21 Jul 2011 14:31:55 -0000
Received: from profane.mongueurs.net (HELO profane.mongueurs.net) (81.80.147.194) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Thu, 21 Jul 2011 07:31:50 -0700
Received: from [127.0.0.1] (localhost [127.0.0.1]) by profane.mongueurs.net (Postfix) with ESMTP id 307D82E020 for <bug-File-Path [...] rt.cpan.org>; Thu, 21 Jul 2011 16:31:46 +0200 (CEST)
Delivered-To: cpan-bug+File-Path [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11
Subject: Re: [rt.cpan.org #53178] bug when only 1 path present and no \%opts
Return-Path: <david [...] landgren.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+File-Path [...] hipster.bestpractical.com
X-RT-Mail-Extension: file-path
Date: Thu, 21 Jul 2011 16:31:50 +0200
X-Spam-Level:
To: bug-File-Path [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: David Landgren <david [...] landgren.net>
RT-Message-ID: <rt-3.8.HEAD-12438-1311258721-1116.53178-0-0 [...] rt.cpan.org>
Content-Length: 833
Download (untitled) / with headers
text/plain 833b
On 19/07/2011 21:39, David Schmidt via RT wrote: Show quoted text
> Queue: File-Path > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=53178> > > awesome, thanks ;) > > On Tue, Jul 19, 2011 at 4:54 PM, Ricardo Signes via RT > <bug-File-Path@rt.cpan.org> wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=53178> >> >> What the OP did not show was that he was probably using an object as the >> $path. This *is* a horrible bug, and it happens when the single >> argument to the routines is an object that is a blessed hash, like a >> Path::Class object.
oog. Show quoted text
>> I have attached a test and a fix. The fix will treat only an unblessed >> hashref as a set of arguments, not a blessed one.
I'll fold this into the distrib and push out a new release this weekend. Thanks for the detective work, David Show quoted text
>> -- >> rjbs >>
> >
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12438-1311258721-1116.53178-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-12439-1311087253-1700.53178-6-0 [...] rt.cpan.org> <CADttTaK0Tw7ZPQT+Ldm14hHWSi44J-ARjs9BmQ6giC==8kCJvQ [...] mail.gmail.com> <rt-3.8.HEAD-12437-1311104348-11.53178-5-0 [...] rt.cpan.org> <4E283856.7070500 [...] landgren.net> <rt-3.8.HEAD-12438-1311258721-1116.53178-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-10809-1333065121-196.53178-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 57
Did this get pushed up? I just ran into this, on 2.08_01.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-10809-1333065121-196.53178-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-12439-1311087253-1700.53178-6-0 [...] rt.cpan.org> <CADttTaK0Tw7ZPQT+Ldm14hHWSi44J-ARjs9BmQ6giC==8kCJvQ [...] mail.gmail.com> <rt-3.8.HEAD-12437-1311104348-11.53178-5-0 [...] rt.cpan.org> <4E283856.7070500 [...] landgren.net> <rt-3.8.HEAD-12438-1311258721-1116.53178-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-10809-1333065121-196.53178-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-23193-1429148934-1378.53178-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: 195
Download (untitled) / with headers
text/plain 195b
On Thu Mar 29 19:52:01 2012, ETHER wrote: Show quoted text
> Did this get pushed up? I just ran into this, on 2.08_01.
I don't think the patches were applied. I find no evidence of rjbs's patch in version 2.09.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-23193-1429148934-1378.53178-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-12439-1311087253-1700.53178-6-0 [...] rt.cpan.org> <CADttTaK0Tw7ZPQT+Ldm14hHWSi44J-ARjs9BmQ6giC==8kCJvQ [...] mail.gmail.com> <rt-3.8.HEAD-12437-1311104348-11.53178-5-0 [...] rt.cpan.org> <4E283856.7070500 [...] landgren.net> <rt-3.8.HEAD-12438-1311258721-1116.53178-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-10809-1333065121-196.53178-0-0 [...] rt.cpan.org> <rt-4.0.18-23193-1429148934-1378.53178-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-7514-1430589419-990.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-7514-1430589419-1339.53178-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: tommylutz [...] gmail.com
Content-Length: 408
Download (untitled) / with headers
text/plain 408b
On Wed Apr 15 21:48:54 2015, JKEENAN wrote: Show quoted text
> On Thu Mar 29 19:52:01 2012, ETHER wrote:
> > Did this get pushed up? I just ran into this, on 2.08_01.
> > I don't think the patches were applied. I find no evidence of rjbs's > patch in version 2.09.
Pull request should be coming shortly to fix this issue. The patch provided above will be used, with the exception of adding the dependency on Scalar::Util.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-7514-1430589419-990.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <RT-Ticket-53178 [...] rt.cpan.org> <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com> <rt-3.8.HEAD-12439-1311087253-1700.53178-6-0 [...] rt.cpan.org> <CADttTaK0Tw7ZPQT+Ldm14hHWSi44J-ARjs9BmQ6giC==8kCJvQ [...] mail.gmail.com> <rt-3.8.HEAD-12437-1311104348-11.53178-5-0 [...] rt.cpan.org> <4E283856.7070500 [...] landgren.net> <rt-3.8.HEAD-12438-1311258721-1116.53178-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-10809-1333065121-196.53178-0-0 [...] rt.cpan.org> <rt-4.0.18-23193-1429148934-1378.53178-0-0 [...] rt.cpan.org> <rt-4.0.18-7514-1430589419-990.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-30889-1430596001-302.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-30889-1430596001-1118.53178-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: tommylutz [...] gmail.com
Content-Length: 546
Download (untitled) / with headers
text/plain 546b
On Sat May 02 13:56:59 2015, tommylutz@gmail.com wrote: Show quoted text
> On Wed Apr 15 21:48:54 2015, JKEENAN wrote:
> > On Thu Mar 29 19:52:01 2012, ETHER wrote:
> > > Did this get pushed up? I just ran into this, on 2.08_01.
> > > > I don't think the patches were applied. I find no evidence of rjbs's > > patch in version 2.09.
> Pull request should be coming shortly to fix this issue. The patch > provided above will be used, with the exception of adding the > dependency on Scalar::Util.
Pull request created: https://github.com/rpcme/File-Path/pull/2
MIME-Version: 1.0
In-Reply-To: <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <17397fd60912280409s3b1ec4eeke42705cd93765f76 [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-11292-1435333893-708.53178-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: tommylutz [...] gmail.com
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 109
Download (untitled) / with headers
text/plain 109b
This issue has been resolved in dev release http://search.cpan.org/~riche/File-Path/Path.pm version 2.10_001.


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.