Skip Menu |

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

Report information
The Basics
Id: 86963
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: File-Util

People
Owner: tommy [...] cpan.org
Requestors: Fiona.Corden [...] metaswitch.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 4.131591
Fixed in: 4.132140



Subject: Error when calling File::Util::list_dir
Date: Tue, 16 Jul 2013 10:15:05 +0000
To: "bug-File-Util [...] rt.cpan.org" <bug-File-Util [...] rt.cpan.org>
From: Fiona Corden <Fiona.Corden [...] metaswitch.com>
I see the following error when calling File::Util::list_dir from the script below. This script works with version 3.39 of File::Util but fails with version 4.131591. To test, you need subdirectories code and/or internal below the script location. I have further subdirectories in both of code and internal, I don't know if this is crucial to the repro (and I'm not going to delete my codebase to find out!). Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.14.2/File/Util.pm line 454. Repro script #!/usr/bin/perl -w use FindBin; use File::Util; my $cROOTDIR = $FindBin::Bin; my $cCODEDIR = "$cROOTDIR/code"; my $cINTERNALDIR = "$cROOTDIR/internal"; my $gFileUtil = File::Util->new(); foreach my $lDir ($cCODEDIR, $cINTERNALDIR) { #*************************************************************************# #* We can't search for directories under X, if X isn't present - so *# #* check first. *# #*************************************************************************# if (-d $lDir) { #***********************************************************************# #* Search for directories. *# #***********************************************************************# my @lDirs = $gFileUtil->list_dir($lDir, qw(--dirs-only --no-fsdots)); } } System info uname -a Linux fiona-VirtualBox 3.2.0-44-generic-pae #69-Ubuntu SMP Thu May 16 18:50:07 UTC 2013 i686 i686 i386 GNU/Linux perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for i686-linux-gnu-thread-multi-64int (with 56 registered patches, see perl -V for more detail) cpan[1]> upgrade File::Util Going to read '/home/fiona/.cpan/Metadata' Database was generated on Tue, 16 Jul 2013 04:53:05 GMT Fetching with HTTP::Tiny: http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/authors/01mailrc.txt.gz Going to read '/home/fiona/.cpan/sources/authors/01mailrc.txt.gz' ............................................................................DONE Fetching with HTTP::Tiny: http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/02packages.details.txt.gz Going to read '/home/fiona/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Tue, 16 Jul 2013 04:53:05 GMT HTTP::Date not available .............. New CPAN.pm version (v2.00) available. [Currently running version is v1.960001] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. ..............................................................DONE Fetching with HTTP::Tiny: http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/03modlist.data.gz Going to read '/home/fiona/.cpan/sources/modules/03modlist.data.gz' ............................................................................DONE Going to write /home/fiona/.cpan/Metadata Package namespace installed latest in CPAN file File::Util 3.39 4.131591 TOMMY/File-Util-4.131591.tar.gz Running install for module 'File::Util' Running make for T/TO/TOMMY/File-Util-4.131591.tar.gz Checksum for /home/fiona/.cpan/sources/authors/id/T/TO/TOMMY/File-Util-4.131591.tar.gz ok Scanning cache /home/fiona/.cpan/build for sizes ............................................................................DONE CPAN.pm: Going to build T/TO/TOMMY/File-Util-4.131591.tar.gz Checking prerequisites... recommends: * Unicode::UTF8 is not installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'File-Util' version '4.131591' Building File-Util TOMMY/File-Util-4.131591.tar.gz ./Build -- OK 'YAML' not installed, will not store persistent state Running Build test t/00-compile.t .................. ok t/000-report-versions-tiny.t .... # # # Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08 # perl: 5.014002 (wanted 5.008001) on linux from /usr/bin/perl # # AutoLoader => 5.71 (want any version) # Config => <undef> (want any version) # Cwd => 3.36 (want any version) # Devel::Cover => module not found. (want any version) # Dist::Zilla => module not found. (want any version) # Exporter => 5.64_03 (want any version) # ExtUtils::MakeMaker => 6.57_05 (want 6.30) # Fcntl => 1.11 (want any version) # File::Find => 1.19 (want any version) # File::Temp => 0.22 (want any version) # Module::Build => 0.38 (want 0.3601) # Perl::Critic => module not found. (want any version) # Perl::Critic::Lax => module not found. (want any version) # Pod::Coverage::TrustPod => module not found. (want any version) # Scalar::Util => 1.23 (want any version) # Test => 1.25_02 (want any version) # Test::CPAN::Changes => module not found. (want 0.19) # Test::CPAN::Meta => module not found. (want any version) # Test::Fatal => module not found. (want any version) # Test::More => 0.98 (want 0.88) # Test::NoWarnings => 1.04 (want any version) # Test::Pod => module not found. (want 1.41) # Test::Pod::Coverage => module not found. (want 1.08) # Unicode::UTF8 => module not found. (want 0.58) # constant => 1.21 (want any version) # strict => 1.04 (want any version) # subs => 1.00 (want any version) # utf8 => 1.09 (want any version) # vars => 1.02 (want any version) # version => 0.88 (want 0.9901) # warnings => 1.12 (want any version) # # Thanks for using my code. I hope it works for you. # If not, please try and include this output in the bug report. # That will help me reproduce the issue and solve your problem. # t/000-report-versions-tiny.t .... ok t/001_canuseit.t ................ ok t/002_isa.t ..................... ok t/003_can.t ..................... ok t/004_portable.t ................ ok t/005_ftests.t .................. ok t/006_io.t ...................... ok t/007_flock.t ................... ok t/008_export_ok.t ............... ok t/009_empty_subclass.t .......... ok t/010_unicode.t ................. ok t/011_abspaths.t ................ ok t/012_atomize_path.t ............ ok t/013_interface_classic.t ....... ok t/014_interface_modern.t ........ ok t/015_destroy.t ................. ok t/016_new.t ..................... ok t/017_make_dir_list_dir.t ....... ok t/018_list_dir_advancedmatch.t .. ok t/019_load_dir.t ................ ok t/020_write_file.t .............. ok All tests successful. Files=22, Tests=409, 3 wallclock secs ( 0.08 usr 0.04 sys + 0.90 cusr 0.16 csys = 1.18 CPU) Result: PASS TOMMY/File-Util-4.131591.tar.gz ./Build test -- OK Running Build install Building File-Util Installing /usr/local/share/perl/5.14.2/File/Util.pm Installing /usr/local/man/man3/File::Util.3pm TOMMY/File-Util-4.131591.tar.gz sudo ./Build install -- OK

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #86963] Error when calling File::Util::list_dir
Date: Tue, 16 Jul 2013 06:30:26 -0500
To: bug-File-Util [...] rt.cpan.org
From: Tommy Butler <masterbucket [...] internetalias.net>
I will look into it today and fix whatever is wrong. I will update you when it is fixed. -- Tommy Butler Fiona Corden via RT <bug-File-Util@rt.cpan.org> wrote: Show quoted text
>Tue Jul 16 06:15:30 2013: Request 86963 was acted upon. >Transaction: Ticket created by Fiona.Corden@metaswitch.com > Queue: File-Util > Subject: Error when calling File::Util::list_dir > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: Fiona.Corden@metaswitch.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86963 > > > >I see the following error when calling File::Util::list_dir from the >script below. This script works with version 3.39 of File::Util but >fails with version 4.131591. To test, you need subdirectories code >and/or internal below the script location. I have further >subdirectories in both of code and internal, I don't know if this is >crucial to the repro (and I'm not going to delete my codebase to find >out!). > >Can't use an undefined value as an ARRAY reference at >/usr/local/share/perl/5.14.2/File/Util.pm line 454. > > >Repro script > >#!/usr/bin/perl -w >use FindBin; >use File::Util; > >my $cROOTDIR = $FindBin::Bin; >my $cCODEDIR = "$cROOTDIR/code"; >my $cINTERNALDIR = "$cROOTDIR/internal"; > >my $gFileUtil = File::Util->new(); > > foreach my $lDir ($cCODEDIR, $cINTERNALDIR) > { >#*************************************************************************# >#* We can't search for directories under X, if X isn't present - so > *# >#* check first. > *# >#*************************************************************************# > if (-d $lDir) > { >#***********************************************************************# >#* Search for directories. >*# >#***********************************************************************# > my @lDirs = $gFileUtil->list_dir($lDir, qw(--dirs-only --no-fsdots)); > } > } > > > >System info > >uname -a >Linux fiona-VirtualBox 3.2.0-44-generic-pae #69-Ubuntu SMP Thu May 16 >18:50:07 UTC 2013 i686 i686 i386 GNU/Linux > >perl -v >This is perl 5, version 14, subversion 2 (v5.14.2) built for >i686-linux-gnu-thread-multi-64int >(with 56 registered patches, see perl -V for more detail) > > >cpan[1]> upgrade File::Util >Going to read '/home/fiona/.cpan/Metadata' > Database was generated on Tue, 16 Jul 2013 04:53:05 GMT >Fetching with HTTP::Tiny: >http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/authors/01mailrc.txt.gz >Going to read '/home/fiona/.cpan/sources/authors/01mailrc.txt.gz' >............................................................................DONE >Fetching with HTTP::Tiny: >http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/02packages.details.txt.gz >Going to read >'/home/fiona/.cpan/sources/modules/02packages.details.txt.gz' > Database was generated on Tue, 16 Jul 2013 04:53:05 GMT > HTTP::Date not available >.............. > New CPAN.pm version (v2.00) available. > [Currently running version is v1.960001] > You might want to try > install CPAN > reload cpan > to both upgrade CPAN.pm and run the new version without leaving > the current session. > > >..............................................................DONE >Fetching with HTTP::Tiny: >http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/03modlist.data.gz >Going to read '/home/fiona/.cpan/sources/modules/03modlist.data.gz' >............................................................................DONE >Going to write /home/fiona/.cpan/Metadata > >Package namespace installed latest in CPAN file >File::Util 3.39 4.131591 >TOMMY/File-Util-4.131591.tar.gz >Running install for module 'File::Util' >Running make for T/TO/TOMMY/File-Util-4.131591.tar.gz >Checksum for >/home/fiona/.cpan/sources/authors/id/T/TO/TOMMY/File-Util-4.131591.tar.gz >ok >Scanning cache /home/fiona/.cpan/build for sizes >............................................................................DONE > > CPAN.pm: Going to build T/TO/TOMMY/File-Util-4.131591.tar.gz > >Checking prerequisites... > recommends: > * Unicode::UTF8 is not installed > >ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the >versions >of the modules indicated above before proceeding with this installation > >Created MYMETA.yml and MYMETA.json >Creating new 'Build' script for 'File-Util' version '4.131591' >Building File-Util > TOMMY/File-Util-4.131591.tar.gz > ./Build -- OK >'YAML' not installed, will not store persistent state >Running Build test >t/00-compile.t .................. ok >t/000-report-versions-tiny.t .... # ># ># Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08 ># perl: 5.014002 (wanted 5.008001) on linux from /usr/bin/perl ># ># AutoLoader => 5.71 (want any >version) ># Config => <undef> (want any >version) ># Cwd => 3.36 (want any >version) ># Devel::Cover => module not found. >(want any version) ># Dist::Zilla => module not found. >(want any version) ># Exporter => 5.64_03 (want any >version) ># ExtUtils::MakeMaker => 6.57_05 (want >6.30) ># Fcntl => 1.11 (want any >version) ># File::Find => 1.19 (want any >version) ># File::Temp => 0.22 (want any >version) ># Module::Build => 0.38 (want >0.3601) ># Perl::Critic => module not found. >(want any version) ># Perl::Critic::Lax => module not found. >(want any version) ># Pod::Coverage::TrustPod => module not found. >(want any version) ># Scalar::Util => 1.23 (want any >version) ># Test => 1.25_02 (want any >version) ># Test::CPAN::Changes => module not found. >(want 0.19) ># Test::CPAN::Meta => module not found. >(want any version) ># Test::Fatal => module not found. >(want any version) ># Test::More => 0.98 (want >0.88) ># Test::NoWarnings => 1.04 (want any >version) ># Test::Pod => module not found. >(want 1.41) ># Test::Pod::Coverage => module not found. >(want 1.08) ># Unicode::UTF8 => module not found. >(want 0.58) ># constant => 1.21 (want any >version) ># strict => 1.04 (want any >version) ># subs => 1.00 (want any >version) ># utf8 => 1.09 (want any >version) ># vars => 1.02 (want any >version) ># version => 0.88 (want >0.9901) ># warnings => 1.12 (want any >version) ># ># Thanks for using my code. I hope it works for you. ># If not, please try and include this output in the bug report. ># That will help me reproduce the issue and solve your problem. ># >t/000-report-versions-tiny.t .... ok >t/001_canuseit.t ................ ok >t/002_isa.t ..................... ok >t/003_can.t ..................... ok >t/004_portable.t ................ ok >t/005_ftests.t .................. ok >t/006_io.t ...................... ok >t/007_flock.t ................... ok >t/008_export_ok.t ............... ok >t/009_empty_subclass.t .......... ok >t/010_unicode.t ................. ok >t/011_abspaths.t ................ ok >t/012_atomize_path.t ............ ok >t/013_interface_classic.t ....... ok >t/014_interface_modern.t ........ ok >t/015_destroy.t ................. ok >t/016_new.t ..................... ok >t/017_make_dir_list_dir.t ....... ok >t/018_list_dir_advancedmatch.t .. ok >t/019_load_dir.t ................ ok >t/020_write_file.t .............. ok >All tests successful. >Files=22, Tests=409, 3 wallclock secs ( 0.08 usr 0.04 sys + 0.90 >cusr 0.16 csys = 1.18 CPU) >Result: PASS > TOMMY/File-Util-4.131591.tar.gz > ./Build test -- OK >Running Build install >Building File-Util >Installing /usr/local/share/perl/5.14.2/File/Util.pm >Installing /usr/local/man/man3/File::Util.3pm > TOMMY/File-Util-4.131591.tar.gz > sudo ./Build install -- OK
-- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Hi same problem here. same error message. I'm searching some dir with line below @List1 = $futil->list_dir( $arc => { files_only => 1 , no_fsdots => 1 , files_match => qr/\.rar$/ } ); if I disable this section below in File/Util.pm, everything seems fine, except sorting which I do not need. I guess there is no subdirs, which maybe causing the problem. ############ # sorting if ( $opts->{ignore_case} ) { $subdirs = [ sort { uc $a cmp uc $b } @$subdirs ]; $files = [ sort { uc $a cmp uc $b } @$files ]; } else { $subdirs = [ sort { $a cmp $b } @$subdirs ]; $files = [ sort { $a cmp $b } @$files ]; } ############ Regards and thank you for the module. On Tue Jul 16 07:31:04 2013, masterbucket@internetalias.net wrote: Show quoted text
> I will look into it today and fix whatever is wrong. I will update > you when it is fixed. > > -- Tommy Butler > > Fiona Corden via RT <bug-File-Util@rt.cpan.org> wrote:
> > Tue Jul 16 06:15:30 2013: Request 86963 was acted upon. > > Transaction: Ticket created by Fiona.Corden@metaswitch.com > > Queue: File-Util > > Subject: Error when calling File::Util::list_dir > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: Fiona.Corden@metaswitch.com > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86963 > > > > > > > I see the following error when calling File::Util::list_dir from the > > script below. This script works with version 3.39 of File::Util but > > fails with version 4.131591. To test, you need subdirectories code > > and/or internal below the script location. I have further > > subdirectories in both of code and internal, I don't know if this is > > crucial to the repro (and I'm not going to delete my codebase to find > > out!). > > > > Can't use an undefined value as an ARRAY reference at > > /usr/local/share/perl/5.14.2/File/Util.pm line 454. > > > > > > Repro script > > > > #!/usr/bin/perl -w > > use FindBin; > > use File::Util; > > > > my $cROOTDIR = $FindBin::Bin; > > my $cCODEDIR = "$cROOTDIR/code"; > > my $cINTERNALDIR = "$cROOTDIR/internal"; > > > > my $gFileUtil = File::Util->new(); > > > > foreach my $lDir ($cCODEDIR, $cINTERNALDIR) > > { > > #*************************************************************************# > > #* We can't search for directories under X, if X isn't present - so > > *# > > #* check first. > > *# > > #*************************************************************************# > > if (-d $lDir) > > { > > #***********************************************************************# > > #* Search for directories. > > *# > > #***********************************************************************# > > my @lDirs = $gFileUtil->list_dir($lDir, qw(--dirs-only --no-fsdots)); > > } > > } > > > > > > > > System info > > > > uname -a > > Linux fiona-VirtualBox 3.2.0-44-generic-pae #69-Ubuntu SMP Thu May 16 > > 18:50:07 UTC 2013 i686 i686 i386 GNU/Linux > > > > perl -v > > This is perl 5, version 14, subversion 2 (v5.14.2) built for > > i686-linux-gnu-thread-multi-64int > > (with 56 registered patches, see perl -V for more detail) > > > > > > cpan[1]> upgrade File::Util > > Going to read '/home/fiona/.cpan/Metadata' > > Database was generated on Tue, 16 Jul 2013 04:53:05 GMT > > Fetching with HTTP::Tiny: > > http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/authors/01mailrc.txt.gz > > Going to read '/home/fiona/.cpan/sources/authors/01mailrc.txt.gz' > > ............................................................................DONE > > Fetching with HTTP::Tiny: > > http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/02packages.details.txt.gz > > Going to read > > '/home/fiona/.cpan/sources/modules/02packages.details.txt.gz' > > Database was generated on Tue, 16 Jul 2013 04:53:05 GMT > > HTTP::Date not available > > .............. > > New CPAN.pm version (v2.00) available. > > [Currently running version is v1.960001] > > You might want to try > > install CPAN > > reload cpan > > to both upgrade CPAN.pm and run the new version without leaving > > the current session. > > > > > > ..............................................................DONE > > Fetching with HTTP::Tiny: > > http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/03modlist.data.gz > > Going to read '/home/fiona/.cpan/sources/modules/03modlist.data.gz' > > ............................................................................DONE > > Going to write /home/fiona/.cpan/Metadata > > > > Package namespace installed latest in CPAN file > > File::Util 3.39 4.131591 > > TOMMY/File-Util-4.131591.tar.gz > > Running install for module 'File::Util' > > Running make for T/TO/TOMMY/File-Util-4.131591.tar.gz > > Checksum for > > /home/fiona/.cpan/sources/authors/id/T/TO/TOMMY/File-Util- > > 4.131591.tar.gz > > ok > > Scanning cache /home/fiona/.cpan/build for sizes > > ............................................................................DONE > > > > CPAN.pm: Going to build T/TO/TOMMY/File-Util-4.131591.tar.gz > > > > Checking prerequisites... > > recommends: > > * Unicode::UTF8 is not installed > > > > ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the > > versions > > of the modules indicated above before proceeding with this > > installation > > > > Created MYMETA.yml and MYMETA.json > > Creating new 'Build' script for 'File-Util' version '4.131591' > > Building File-Util > > TOMMY/File-Util-4.131591.tar.gz > > ./Build -- OK > > 'YAML' not installed, will not store persistent state > > Running Build test > > t/00-compile.t .................. ok > > t/000-report-versions-tiny.t .... # > > # > > # Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08 > > # perl: 5.014002 (wanted 5.008001) on linux from /usr/bin/perl > > # > > # AutoLoader => 5.71 (want > > any > > version) > > # Config => <undef> (want > > any > > version) > > # Cwd => 3.36 (want > > any > > version) > > # Devel::Cover => module not found. > > (want any version) > > # Dist::Zilla => module not found. > > (want any version) > > # Exporter => 5.64_03 (want > > any > > version) > > # ExtUtils::MakeMaker => 6.57_05 (want > > 6.30) > > # Fcntl => 1.11 (want > > any > > version) > > # File::Find => 1.19 (want > > any > > version) > > # File::Temp => 0.22 (want > > any > > version) > > # Module::Build => 0.38 (want > > 0.3601) > > # Perl::Critic => module not found. > > (want any version) > > # Perl::Critic::Lax => module not found. > > (want any version) > > # Pod::Coverage::TrustPod => module not found. > > (want any version) > > # Scalar::Util => 1.23 (want > > any > > version) > > # Test => 1.25_02 (want > > any > > version) > > # Test::CPAN::Changes => module not found. > > (want 0.19) > > # Test::CPAN::Meta => module not found. > > (want any version) > > # Test::Fatal => module not found. > > (want any version) > > # Test::More => 0.98 (want > > 0.88) > > # Test::NoWarnings => 1.04 (want > > any > > version) > > # Test::Pod => module not found. > > (want 1.41) > > # Test::Pod::Coverage => module not found. > > (want 1.08) > > # Unicode::UTF8 => module not found. > > (want 0.58) > > # constant => 1.21 (want > > any > > version) > > # strict => 1.04 (want > > any > > version) > > # subs => 1.00 (want > > any > > version) > > # utf8 => 1.09 (want > > any > > version) > > # vars => 1.02 (want > > any > > version) > > # version => 0.88 (want > > 0.9901) > > # warnings => 1.12 (want > > any > > version) > > # > > # Thanks for using my code. I hope it works for you. > > # If not, please try and include this output in the bug report. > > # That will help me reproduce the issue and solve your problem. > > # > > t/000-report-versions-tiny.t .... ok > > t/001_canuseit.t ................ ok > > t/002_isa.t ..................... ok > > t/003_can.t ..................... ok > > t/004_portable.t ................ ok > > t/005_ftests.t .................. ok > > t/006_io.t ...................... ok > > t/007_flock.t ................... ok > > t/008_export_ok.t ............... ok > > t/009_empty_subclass.t .......... ok > > t/010_unicode.t ................. ok > > t/011_abspaths.t ................ ok > > t/012_atomize_path.t ............ ok > > t/013_interface_classic.t ....... ok > > t/014_interface_modern.t ........ ok > > t/015_destroy.t ................. ok > > t/016_new.t ..................... ok > > t/017_make_dir_list_dir.t ....... ok > > t/018_list_dir_advancedmatch.t .. ok > > t/019_load_dir.t ................ ok > > t/020_write_file.t .............. ok > > All tests successful. > > Files=22, Tests=409, 3 wallclock secs ( 0.08 usr 0.04 sys + 0.90 > > cusr 0.16 csys = 1.18 CPU) > > Result: PASS > > TOMMY/File-Util-4.131591.tar.gz > > ./Build test -- OK > > Running Build install > > Building File-Util > > Installing /usr/local/share/perl/5.14.2/File/Util.pm > > Installing /usr/local/man/man3/File::Util.3pm > > TOMMY/File-Util-4.131591.tar.gz > > sudo ./Build install -- OK
Subject: Re: [rt.cpan.org #86963] Error when calling File::Util::list_dir
Date: Fri, 02 Aug 2013 10:44:37 -0500
To: bug-File-Util [...] rt.cpan.org
From: Tommy Butler <ace [...] tommybutler.me>
Thanks Atif. I'm working on a small patch which I believe will solve the problem. I'm going to publish it on the CPAN as a beta status initially. I will send a link to you when it is published by responding to this bug report you have filed. When I do publish the fix, please be so kind as to give it a try with the new module. I apologize for the inconvenience that the bug has caused you, but I thank you for reporting it. --Tommy Butler On 08/02/2013 08:04 AM, Atif Kirimli via RT wrote: Show quoted text
> Queue: File-Util > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86963 > > > Hi same problem here. > same error message. > > I'm searching some dir with line below > @List1 = $futil->list_dir( $arc => { files_only => 1 , no_fsdots => 1 , files_match => qr/\.rar$/ } ); > > if I disable this section below in File/Util.pm, everything seems fine, except sorting which I do not need. I guess there is no subdirs, which maybe causing the problem. > > ############ > # sorting > if ( $opts->{ignore_case} ) { > > $subdirs = [ sort { uc $a cmp uc $b } @$subdirs ]; > $files = [ sort { uc $a cmp uc $b } @$files ]; > } > else { > > $subdirs = [ sort { $a cmp $b } @$subdirs ]; > $files = [ sort { $a cmp $b } @$files ]; > } > > ############ > > Regards and thank you for the module. > > On Tue Jul 16 07:31:04 2013, masterbucket@internetalias.net wrote:
>> I will look into it today and fix whatever is wrong. I will update >> you when it is fixed. >> >> -- Tommy Butler >> >> Fiona Corden via RT <bug-File-Util@rt.cpan.org> wrote:
>>> Tue Jul 16 06:15:30 2013: Request 86963 was acted upon. >>> Transaction: Ticket created by Fiona.Corden@metaswitch.com >>> Queue: File-Util >>> Subject: Error when calling File::Util::list_dir >>> Broken in: (no value) >>> Severity: (no value) >>> Owner: Nobody >>> Requestors: Fiona.Corden@metaswitch.com >>> Status: new >>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86963 > >>> >>> >>> I see the following error when calling File::Util::list_dir from the >>> script below. This script works with version 3.39 of File::Util but >>> fails with version 4.131591. To test, you need subdirectories code >>> and/or internal below the script location. I have further >>> subdirectories in both of code and internal, I don't know if this is >>> crucial to the repro (and I'm not going to delete my codebase to find >>> out!). >>> >>> Can't use an undefined value as an ARRAY reference at >>> /usr/local/share/perl/5.14.2/File/Util.pm line 454. >>> >>> >>> Repro script >>> >>> #!/usr/bin/perl -w >>> use FindBin; >>> use File::Util; >>> >>> my $cROOTDIR = $FindBin::Bin; >>> my $cCODEDIR = "$cROOTDIR/code"; >>> my $cINTERNALDIR = "$cROOTDIR/internal"; >>> >>> my $gFileUtil = File::Util->new(); >>> >>> foreach my $lDir ($cCODEDIR, $cINTERNALDIR) >>> { >>> #*************************************************************************# >>> #* We can't search for directories under X, if X isn't present - so >>> *# >>> #* check first. >>> *# >>> #*************************************************************************# >>> if (-d $lDir) >>> { >>> #***********************************************************************# >>> #* Search for directories. >>> *# >>> #***********************************************************************# >>> my @lDirs = $gFileUtil->list_dir($lDir, qw(--dirs-only --no-fsdots)); >>> } >>> } >>> >>> >>> >>> System info >>> >>> uname -a >>> Linux fiona-VirtualBox 3.2.0-44-generic-pae #69-Ubuntu SMP Thu May 16 >>> 18:50:07 UTC 2013 i686 i686 i386 GNU/Linux >>> >>> perl -v >>> This is perl 5, version 14, subversion 2 (v5.14.2) built for >>> i686-linux-gnu-thread-multi-64int >>> (with 56 registered patches, see perl -V for more detail) >>> >>> >>> cpan[1]> upgrade File::Util >>> Going to read '/home/fiona/.cpan/Metadata' >>> Database was generated on Tue, 16 Jul 2013 04:53:05 GMT >>> Fetching with HTTP::Tiny: >>> http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/authors/01mailrc.txt.gz >>> Going to read '/home/fiona/.cpan/sources/authors/01mailrc.txt.gz' >>> ............................................................................DONE >>> Fetching with HTTP::Tiny: >>> http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/02packages.details.txt.gz >>> Going to read >>> '/home/fiona/.cpan/sources/modules/02packages.details.txt.gz' >>> Database was generated on Tue, 16 Jul 2013 04:53:05 GMT >>> HTTP::Date not available >>> .............. >>> New CPAN.pm version (v2.00) available. >>> [Currently running version is v1.960001] >>> You might want to try >>> install CPAN >>> reload cpan >>> to both upgrade CPAN.pm and run the new version without leaving >>> the current session. >>> >>> >>> ..............................................................DONE >>> Fetching with HTTP::Tiny: >>> http://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/03modlist.data.gz >>> Going to read '/home/fiona/.cpan/sources/modules/03modlist.data.gz' >>> ............................................................................DONE >>> Going to write /home/fiona/.cpan/Metadata >>> >>> Package namespace installed latest in CPAN file >>> File::Util 3.39 4.131591 >>> TOMMY/File-Util-4.131591.tar.gz >>> Running install for module 'File::Util' >>> Running make for T/TO/TOMMY/File-Util-4.131591.tar.gz >>> Checksum for >>> /home/fiona/.cpan/sources/authors/id/T/TO/TOMMY/File-Util- >>> 4.131591.tar.gz >>> ok >>> Scanning cache /home/fiona/.cpan/build for sizes >>> ............................................................................DONE >>> >>> CPAN.pm: Going to build T/TO/TOMMY/File-Util-4.131591.tar.gz >>> >>> Checking prerequisites... >>> recommends: >>> * Unicode::UTF8 is not installed >>> >>> ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the >>> versions >>> of the modules indicated above before proceeding with this >>> installation >>> >>> Created MYMETA.yml and MYMETA.json >>> Creating new 'Build' script for 'File-Util' version '4.131591' >>> Building File-Util >>> TOMMY/File-Util-4.131591.tar.gz >>> ./Build -- OK >>> 'YAML' not installed, will not store persistent state >>> Running Build test >>> t/00-compile.t .................. ok >>> t/000-report-versions-tiny.t .... # >>> # >>> # Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08 >>> # perl: 5.014002 (wanted 5.008001) on linux from /usr/bin/perl >>> # >>> # AutoLoader => 5.71 (want >>> any >>> version) >>> # Config => <undef> (want >>> any >>> version) >>> # Cwd => 3.36 (want >>> any >>> version) >>> # Devel::Cover => module not found. >>> (want any version) >>> # Dist::Zilla => module not found. >>> (want any version) >>> # Exporter => 5.64_03 (want >>> any >>> version) >>> # ExtUtils::MakeMaker => 6.57_05 (want >>> 6.30) >>> # Fcntl => 1.11 (want >>> any >>> version) >>> # File::Find => 1.19 (want >>> any >>> version) >>> # File::Temp => 0.22 (want >>> any >>> version) >>> # Module::Build => 0.38 (want >>> 0.3601) >>> # Perl::Critic => module not found. >>> (want any version) >>> # Perl::Critic::Lax => module not found. >>> (want any version) >>> # Pod::Coverage::TrustPod => module not found. >>> (want any version) >>> # Scalar::Util => 1.23 (want >>> any >>> version) >>> # Test => 1.25_02 (want >>> any >>> version) >>> # Test::CPAN::Changes => module not found. >>> (want 0.19) >>> # Test::CPAN::Meta => module not found. >>> (want any version) >>> # Test::Fatal => module not found. >>> (want any version) >>> # Test::More => 0.98 (want >>> 0.88) >>> # Test::NoWarnings => 1.04 (want >>> any >>> version) >>> # Test::Pod => module not found. >>> (want 1.41) >>> # Test::Pod::Coverage => module not found. >>> (want 1.08) >>> # Unicode::UTF8 => module not found. >>> (want 0.58) >>> # constant => 1.21 (want >>> any >>> version) >>> # strict => 1.04 (want >>> any >>> version) >>> # subs => 1.00 (want >>> any >>> version) >>> # utf8 => 1.09 (want >>> any >>> version) >>> # vars => 1.02 (want >>> any >>> version) >>> # version => 0.88 (want >>> 0.9901) >>> # warnings => 1.12 (want >>> any >>> version) >>> # >>> # Thanks for using my code. I hope it works for you. >>> # If not, please try and include this output in the bug report. >>> # That will help me reproduce the issue and solve your problem. >>> # >>> t/000-report-versions-tiny.t .... ok >>> t/001_canuseit.t ................ ok >>> t/002_isa.t ..................... ok >>> t/003_can.t ..................... ok >>> t/004_portable.t ................ ok >>> t/005_ftests.t .................. ok >>> t/006_io.t ...................... ok >>> t/007_flock.t ................... ok >>> t/008_export_ok.t ............... ok >>> t/009_empty_subclass.t .......... ok >>> t/010_unicode.t ................. ok >>> t/011_abspaths.t ................ ok >>> t/012_atomize_path.t ............ ok >>> t/013_interface_classic.t ....... ok >>> t/014_interface_modern.t ........ ok >>> t/015_destroy.t ................. ok >>> t/016_new.t ..................... ok >>> t/017_make_dir_list_dir.t ....... ok >>> t/018_list_dir_advancedmatch.t .. ok >>> t/019_load_dir.t ................ ok >>> t/020_write_file.t .............. ok >>> All tests successful. >>> Files=22, Tests=409, 3 wallclock secs ( 0.08 usr 0.04 sys + 0.90 >>> cusr 0.16 csys = 1.18 CPU) >>> Result: PASS >>> TOMMY/File-Util-4.131591.tar.gz >>> ./Build test -- OK >>> Running Build install >>> Building File-Util >>> Installing /usr/local/share/perl/5.14.2/File/Util.pm >>> Installing /usr/local/man/man3/File::Util.3pm >>> TOMMY/File-Util-4.131591.tar.gz >>> sudo ./Build install -- OK
>
Subject: Re: [rt.cpan.org #86963] Error when calling File::Util::list_dir
Date: Fri, 02 Aug 2013 12:17:06 -0500
To: bug-File-Util [...] rt.cpan.org
From: Tommy Butler <ace [...] tommybutler.me>
File::Util version 4.132140 has been uploaded to the CPAN, which should fix your issue. I also added a new regression test to the test suite to make sure the bug doesn't re-appear in the future. Please download version File-Util-4.132140.tar.gz from the CPAN when it appears on your selected CPAN mirror (soon) and let me know if you still experience issues. --Tommy Butler On 08/02/2013 10:45 AM, Tommy Butler via RT wrote: Show quoted text
> Queue: File-Util > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86963 > > > Thanks Atif. I'm working on a small patch which I believe will solve > the problem. I'm going to publish it on the CPAN as a beta status > initially. I will send a link to you when it is published by responding > to this bug report you have filed. > > When I do publish the fix, please be so kind as to give it a try with > the new module. > > I apologize for the inconvenience that the bug has caused you, but I > thank you for reporting it. >
Hi Tommy, Thank you very much, my code works just fine with version 4.132140 . Sorry, I just noticed your mail today, as I'm not a frequent user for this site. Best regards, On Fri Aug 02 13:17:23 2013, ace@tommybutler.me wrote: Show quoted text
> File::Util version 4.132140 has been uploaded to the CPAN, which should > fix your issue. I also added a new regression test to the test suite to > make sure the bug doesn't re-appear in the future. > > Please download version File-Util-4.132140.tar.gz from the CPAN when it > appears on your selected CPAN mirror (soon) and let me know if you still > experience issues. > > --Tommy Butler > > On 08/02/2013 10:45 AM, Tommy Butler via RT wrote:
> > Queue: File-Util > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86963 > > > > > Thanks Atif. I'm working on a small patch which I believe will solve > > the problem. I'm going to publish it on the CPAN as a beta status > > initially. I will send a link to you when it is published by responding > > to this bug report you have filed. > > > > When I do publish the fix, please be so kind as to give it a try with > > the new module. > > > > I apologize for the inconvenience that the bug has caused you, but I > > thank you for reporting it. > >
>