Skip Menu |

This queue is for tickets about the Tie-DB_Lock CPAN distribution.

Report information
The Basics
Id: 1703
Status: resolved
Priority: 0/
Queue: Tie-DB_Lock

People
Owner: Nobody in particular
Requestors: gbrock [...] cpan.org
Cc:
AdminCc:

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



Subject: _random_string()'s length is random too
Using perl 5.6.0 on Solaris 2.5.1. In Tie::DB_Lock, at line 74, you call &_random_string; The _random_string() subroutine then chooses the length of the sting based on shift || 9, but due to the lack of ()'s in the call, @_ is unpredictable. On my system, the length is 420 characters and so the copy fails! Easy fix is to change line 74 from: my $tempfile = "$TEMPDIR/" . &_random_string; to my $tempfile = "$TEMPDIR/" . &_random_string(); Regards, Gavin
[GBROCK - Tue Oct 22 00:01:30 2002]: Show quoted text
> Using perl 5.6.0 on Solaris 2.5.1. > > In Tie::DB_Lock, at line 74, you call &_random_string; The > _random_string() subroutine then chooses the length of the sting > based on shift || 9, but due to the lack of ()'s in the call, @_ is > unpredictable. On my system, the length is 420 characters and so > the copy fails! > > Easy fix is to change line 74 from: > my $tempfile = "$TEMPDIR/" . &_random_string; > to > my $tempfile = "$TEMPDIR/" . &_random_string(); > > Regards, > > Gavin
Thanks for the report. I've fixed this and added a test in a new version, 0.07. -Ken