Skip Menu |

This queue is for tickets about the Perl-Critic-Pulp CPAN distribution.

Report information
The Basics
Id: 78053
Status: resolved
Priority: 0/
Queue: Perl-Critic-Pulp

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

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



Subject: Need to require File::Temp 0.19
devel/MyUniqByInode.pm and t/ProhibitModuleShebang.t use File::Temp->newdir, which was only introduced in File::Temp version 0.19, so you should require at least this version. Using an older version causes t/ProhibitModuleShebang.t to fail: t/ProhibitModuleShebang............Can't locate object method "newdir" via package "File::Temp" at t/ProhibitModuleShebang.t line 62, <DATA> line 1002. # Looks like you planned 15 tests but only ran 8. # Looks like your test died just after 8. dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 9-15 Failed 7/15 tests, 53.33% okay
From: paul [...] city-fan.org
On Tue Jun 26 05:08:08 2012, paul@city-fan.org wrote: Show quoted text
> devel/MyUniqByInode.pm and t/ProhibitModuleShebang.t use > File::Temp->newdir, which was only introduced in File::Temp version > 0.19, so you should require at least this version. > > Using an older version causes t/ProhibitModuleShebang.t to fail: > > t/ProhibitModuleShebang............Can't locate object method "newdir" > via package "File::Temp" at t/ProhibitModuleShebang.t line 62, <DATA> > line 1002. > # Looks like you planned 15 tests but only ran 8. > # Looks like your test died just after 8. > dubious > Test returned status 255 (wstat 65280, 0xff00) > DIED. FAILED tests 9-15 > Failed 7/15 tests, 53.33% okay
Alternatively, you could use the non-OO interface, which would retain compatibility with older versions of File::Temp: --- t/ProhibitModuleShebang.t +++ t/ProhibitModuleShebang.t @@ -59,7 +59,7 @@ "VERSION object check $check_version"); } -my $dir = File::Temp->newdir; +my $dir = File::Temp->tempdir( "tmpdirXXXXXXXX", CLEANUP => 1 ); foreach my $data ([ 1, 'Foo.pm', '#!/usr/bin/perl -w' ], [ 1, 'Foo.pm', '#!perl' ],
Thanks, I changed it to plain files instead of tempfiles.