Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Domain-PublicSuffix CPAN distribution.

Report information
The Basics
Id: 76894
Status: resolved
Priority: 0/
Queue: Domain-PublicSuffix

People
Owner: Nobody in particular
Requestors: gavin [...] openfusion.com.au
Cc:
AdminCc:

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

Attachments


Subject: File::Spec->catpath used in error?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1335781595-20172-80"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 259
Download (untitled) / with headers
text/plain 259b
The code to create the search path for the effective_tld_names.dat in _parse_data_file looks broken to me - the initial catfile is weird, and the subsequent catpath calls look like they're meant to be catdirs instead? Suggested patch attached. Cheers, Gavin
Subject: Domain-PublicSuffix-0.04-fix-catdir.patch
MIME-Version: 1.0
Content-Type: application/octet-stream; name="Domain-PublicSuffix-0.04-fix-catdir.patch"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="Domain-PublicSuffix-0.04-fix-catdir.patch"
Content-Transfer-Encoding: base64
Content-Length: 1339
From 6efae2f5fae859fe464f116c3839c2c3bc8c6131 Mon Sep 17 00:00:00 2001 From: Gavin Carr <gavin@openfusion.com.au> Date: Mon, 30 Apr 2012 20:13:46 +1000 Subject: [PATCH] Fix File::Spec->catdir path issues. --- lib/Domain/PublicSuffix.pm | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Domain/PublicSuffix.pm b/lib/Domain/PublicSuffix.pm index 6ef4702..c56a6bc 100755 --- a/lib/Domain/PublicSuffix.pm +++ b/lib/Domain/PublicSuffix.pm @@ -220,11 +220,10 @@ sub _parse_data_file { } else { my @paths = ( - File::Spec->catfile(qw/ etc /), - File::Spec->catpath(qw/ etc /), - File::Spec->catpath(qw/ usr etc /), - File::Spec->catpath(qw/ usr local etc /), - File::Spec->catpath(qw/ opt local etc /), + File::Spec->catdir(File::Spec->rootdir, qw/ etc /), + File::Spec->catdir(File::Spec->rootdir, qw/ usr etc /), + File::Spec->catdir(File::Spec->rootdir, qw/ usr local etc /), + File::Spec->catdir(File::Spec->rootdir, qw/ opt local etc /), ); foreach my $path (@paths) { $path = File::Spec->catfile( $path, "effective_tld_names.dat" ); @@ -405,4 +404,4 @@ under the same terms as Perl itself. =cut -1; \ No newline at end of file +1; -- 1.7.1
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-3684-1342562317-1595.76894-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 55
Your patch has been applied in release 0.05. Thank you!


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.