Skip Menu |
 

This queue is for tickets about the Class-Accessor-Lite CPAN distribution.

Report information
The Basics
Id: 100808
Status: open
Priority: 0/
Queue: Class-Accessor-Lite

People
Owner: Nobody in particular
Requestors: nanis [...] runu.moc.invalid
Cc:
AdminCc:

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

Attachments


Subject: t/00-base.t fails on Windows with nmake due to hard-coded file name
Download (untitled) / with headers
text/plain 870b
See "C:\opt\perl-5.20.1\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t\00-base.t t\01-new.t t\02-use.t t\03-use-error.t t\00-base.t ....... 1/14 # Failed test at t\00-base.t line 26. # ''K' cannot access the value of 'ro' on objects of class 'K' at t\00-base.t line 24. # ' # doesn't match '(?^:'K' cannot access the value of 'ro' on objects of class 'K' at t/00-base.t line )' # Failed test at t\00-base.t line 33. # ''K' cannot alter the value of 'wo' on objects of class 'K' at t\00-base.t line 30. # ' # doesn't match '(?^:'K' cannot alter the value of 'wo' on objects of class 'K' at t/00-base.t line )' # Looks like you failed 2 tests of 14. t\00-base.t ....... Dubious, test returned 2 (wstat 512, 0x200)
Subject: nanis-fix-hard-coded-paths-in-tests.patch
From 537f0017b92196fc527a9b73cad48bc281b3f3ce Mon Sep 17 00:00:00 2001 From: "A. Sinan Unur" <nanis@cpan.org> Date: Tue, 9 Dec 2014 14:00:48 -0500 Subject: [PATCH 1/2] Fix "Cannot determine perl version info from lib/Class/Accessor/Lite.pm" Based on the LICENSE section in the POD, I deduced that this module is meant to be compatible with perl 5.008006, and later. --- lib/Class/Accessor/Lite.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Class/Accessor/Lite.pm b/lib/Class/Accessor/Lite.pm index 145df42..7874317 100644 --- a/lib/Class/Accessor/Lite.pm +++ b/lib/Class/Accessor/Lite.pm @@ -1,5 +1,6 @@ package Class::Accessor::Lite; +use 5.008006; use strict; our $VERSION = '0.06'; -- 2.1.1 From f7cc43504cb4ce185ea7a7dcdc23b54f1661b23c Mon Sep 17 00:00:00 2001 From: "A. Sinan Unur" <nanis@cpan.org> Date: Tue, 9 Dec 2014 14:02:55 -0500 Subject: [PATCH 2/2] Fix spurious test failure due to hard-coded file name. On Windows with nmake, the script is invoked with Windows style directory separators in the filename, and the test fails due the hard-coded file name in regex pattern. Fix by matching against \Q$0\E instead. --- t/00-base.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/00-base.t b/t/00-base.t index 2336f0c..ada85dc 100644 --- a/t/00-base.t +++ b/t/00-base.t @@ -23,12 +23,12 @@ is($k->bar, 2); is($k->ro, 3); eval { $k->ro(99) }; my $e = $@; -like $e, qr{'K' cannot access the value of 'ro' on objects of class 'K' at t/00-base.t line }; +like $e, qr{'K' cannot access the value of 'ro' on objects of class 'K' at \Q$0\E line }; $k->wo(801); is $k->{wo}, '801'; is_deeply($k->wo(2, 3), [ 2, 3 ]); eval { $k->wo() }; $e = $@; ok $e; -like $e, qr{'K' cannot alter the value of 'wo' on objects of class 'K' at t/00-base.t line }; +like $e, qr{'K' cannot alter the value of 'wo' on objects of class 'K' at \Q$0\E line }; -- 2.1.1
Download (untitled) / with headers
text/plain 218b
I don't think you can deduce a "use 5.008006" just from the perl version specified in the license. Also, it's good style to put a short comment next to a "use 5.XY" line why a newer perl is needed. Regards, Slaven
Download (untitled) / with headers
text/plain 972b
Hi Slaven: On Tue Dec 09 14:39:48 2014, SREZIC wrote: Show quoted text
> I don't think you can deduce a "use 5.008006" just from the perl > version specified in the license. Also, it's good style to put a short > comment next to a "use 5.XY" line why a newer perl is needed.
Both points taken. I am not sure how you ended up getting this bug report, FYI, the more important patch is the one that fixes the subject line. So, if you are maintaining this module, feel free to ignore the first patch, but please do consider the second one. There is no need to hard-code file names in tests. They cause failures when the platform specific directory separator does not match what the author is used to. All the following modules depend on this one which means if someone tries to install any of them via a CPAN client on Windows using Microsoft tools, they'll unnecessarily run into problems. https://metacpan.org/requires/distribution/Class-Accessor-Lite?sort=[[2,1]] Thank you, -- Sinan


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.