Skip Menu |

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

Report information
The Basics
Id: 59019
Status: resolved
Priority: 0/
Queue: File-Find-Parallel

People
Owner: Nobody in particular
Requestors: apb [...] cequrux.com
Cc:
AdminCc:

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



Subject: Dependency on File::Tempdir is unnecessary
Date: Thu, 1 Jul 2010 11:10:37 +0200
To: bug-File-Find-Parallel [...] rt.cpan.org
From: Alan Barrett <apb [...] cequrux.com>
Please could you change File::Find::Parallel to use File::Temp (which is built in to recent versions of perl) instead of File::Tempdir (which is an external module). It appears to me that this usage will do the right thing: $dir = File::Temp->newdir( $template, CLEANUP => 1 ); --apb (Alan Barrett)
Here's a patch to use File::Temp->newdir() instead of File::Tempdir::new()
Subject: patch.txt
diff --git a/META.yml b/META.yml index 511ba93..009a172 100644 --- a/META.yml +++ b/META.yml @@ -6,7 +6,7 @@ license: perl generated_by: ExtUtils::MakeMaker version 6.36_01 distribution_type: module requires: - File::Tempdir: 0.02 + File::Temp: 0.22 Getopt::Long: 2.34 Pod::Usage: 1.3 Test::More: 0 diff --git a/Makefile.PL b/Makefile.PL index d5ce6d0..62c9375 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,7 +24,7 @@ my %ARGS = ( EXE_FILES => [], PREREQ_PM => { 'Test::More' => 0, - 'File::Tempdir' => '0.02', + 'File::Temp' => '0.22', # XXX or perhaps earlier versions? }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'File-Find-Parallel-*' }, diff --git a/lib/File/Find/Parallel.pm b/lib/File/Find/Parallel.pm index 4857a95..bea6fbb 100644 --- a/lib/File/Find/Parallel.pm +++ b/lib/File/Find/Parallel.pm @@ -298,7 +298,7 @@ are built. =head1 DEPENDENCIES -The tests require L<File::Tempdir> and optionally L<Test::Pod::Coverage> +The tests require L<File::Temp> and optionally L<Test::Pod::Coverage> and L<Test::Pod>. The L<lncopies> script requires L<Getopt::Long> and L<Pod::Usage>. diff --git a/t/20.iter.t b/t/20.iter.t index 2f4fee1..25ab2b2 100644 --- a/t/20.iter.t +++ b/t/20.iter.t @@ -2,7 +2,7 @@ use strict; use warnings; -use File::Tempdir; +use File::Temp; use File::Path; use File::Spec; use File::Find::Parallel; @@ -103,9 +103,9 @@ for my $test ( @schedule ) { # Setup for my $create ( @{ $test->{create} } ) { - my $td = File::Tempdir->new(); + my $td = File::Temp->newdir(); push @temp, $td; # stop it going out of scope - my $root = $td->name; + my $root = $td->dirname; $ffp->add_dirs( $root ); # Make directories
Patch applied and released as 0.53, thanks!