Skip Menu |

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

Report information
The Basics
Id: 85141
Status: resolved
Priority: 0/
Queue: File-Util

People
Owner: Nobody in particular
Requestors: bamccaig [...] gmail.com
Cc:
AdminCc:

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



Subject: [bamccaig@gmail.com: Re: problem with File::Util::readlimit]
Date: Wed, 8 May 2013 14:37:39 -0400
To: bug-File-Util [...] rt.cpan.org
From: Brandon McCaig <bamccaig [...] gmail.com>
Looks like we've discovered a bug in File::Util over on the beginners@perl.org list. I'm running perl 5.16.3. File::Util appears to be 3.39. See forwarded message below. The problem can be demonstrated with this one-liner: perl -MFile::Util -E 'File::Util->new()->readlimit(1024 ** 2);' Regards, -- Brandon McCaig <bamccaig@gmail.com> <bamccaig@castopulence.org> Castopulence Software <https://www.castopulence.org/> Blog <http://www.bamccaig.com/> perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }. q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.}; tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say' ----- Forwarded message from Brandon McCaig <bamccaig@gmail.com> ----- Date: Wed, 8 May 2013 14:24:59 -0400 From: Brandon McCaig <bamccaig@gmail.com> To: Luca Ferrari <fluca1978@infinito.it> Cc: beginners@perl.org Subject: Re: problem with File::Util::readlimit User-Agent: Mutt/1.5.20 (2009-06-14) Mail-Followup-To: Luca Ferrari <fluca1978@infinito.it>, beginners@perl.org On Wed, May 08, 2013 at 06:49:48PM +0200, Luca Ferrari wrote: Show quoted text
> Hello,
Hello, Show quoted text
> I'm encountering a problem with File::Util that I'm not able to > see, and I'm sure it's trivial: > > my $handle_file = new File::Util; > my $files_for = {}; > my $max_file_size = int( 1024 * 1024 * 1024 ); > $handle_file->readlimit( $max_file_size ); > > that once run produces the following trace: > > PROCESS TERMINATED DUE TO ERRORS
*snip* Show quoted text
> Any idea about what I'm missing?
Looks like a module bug to me. A freshly installed File/Util.pm said: Show quoted text
> sub readlimit { > my $arg = _myargs( @_ ); > > if ( defined $arg ) { > > return File::Util->new()->_throw > ( > 'bad readlimit' => { bad => $arg } > ) if $arg !~ /\D/o; > > $READLIMIT = $arg; > } > > return $READLIMIT; > }
Looks like it raises an exception if the argument doesn't match a NON-"digit" character. Which seems like the opposite of what is wanted. Regards, -- Brandon McCaig <bamccaig@gmail.com> <bamccaig@castopulence.org> Castopulence Software <https://www.castopulence.org/> Blog <http://www.bamccaig.com/> perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }. q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.}; tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say' Show quoted text
----- End forwarded message -----
Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

This issue should be fixed in the latest version, which has proven very stable in testing over the last few months. Pleas let me know if your issue isn't solved by upgrading to 4.130610-TRIAL. I know it has the "TRIAL" release label, however with months of stability I am about to release it as "mature". DOCUMENTATION https://metacpan.org/module/TOMMY/File-Util-4.130610-TRIAL/lib/File/Util.pm DOWNLOAD http://cpan.metacpan.org/authors/id/T/TO/TOMMY/File-Util-4.130610-TRIAL.tar.gz CPAN TESTERS RESULTS (100% PASS on over 10 platforms since March 2, 2013) (219 ALLs 219 PASSes ) On Wed May 08 14:37:55 2013, bamccaig@gmail.com wrote: Show quoted text
> Looks like we've discovered a bug in File::Util over on the > beginners@perl.org list. I'm running perl 5.16.3. File::Util > appears to be 3.39. See forwarded message below. The problem can > be demonstrated with this one-liner: > > perl -MFile::Util -E 'File::Util->new()->readlimit(1024 ** 2);' > > Regards, > >
Subject: Re: [rt.cpan.org #85141] [bamccaig@gmail.com: Re: problem with File::Util::readlimit]
Date: Wed, 8 May 2013 19:21:38 -0400
To: bug-File-Util [...] rt.cpan.org
From: Brandon McCaig <bamccaig [...] gmail.com>
On Wed, May 8, 2013 at 5:38 PM, Tommy Butler via RT <bug-File-Util@rt.cpan.org> wrote: Show quoted text
> This issue should be fixed in the latest version, which has > proven very stable in testing over the last few months. Pleas > let me know if your issue isn't solved by upgrading to > 4.130610-TRIAL. I know it has the "TRIAL" release label, > however with months of stability I am about to release it as > "mature".
Ah, I should have checked for more up-to-date code first. :) Sorry for the noise. Thanks. Regards, -- Brandon McCaig <bamccaig@gmail.com> <bamccaig@castopulence.org> Castopulence Software <https://www.castopulence.org/> Blog <http://www.bamccaig.com/> perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }. q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.}; tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'