Skip Menu |

This queue is for tickets about the Apache-Throttle CPAN distribution.

Report information
The Basics
Id: 2001
Status: new
Priority: 0/
Queue: Apache-Throttle

People
Owner: Nobody in particular
Requestors: jusvictor [...] hotmail.com
Cc:
AdminCc:

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



Subject: Apache::Throttle cache
I was evaluating the latest version on the module for a little while (0.03), and noticed something that I think may be a bug, so I'd just like to draw it to your attention. On line 63 of Throttle.pm there is this line which is supposed to print the speeds for each user to a file, joined by ':'s. print TCACHE map { join(":", @$_) } @speeds; The problem I believe (if I can call it that), is that the code that retrieves the speeds for each user from the file does so using the '<>' operator (ie each line of the file using newlines as the separator, as $/ wasn't redefined). (line 36) @speeds = map { [ split /:/ ] } <TCACHE>; It doesn't really work as expected because the former piece of code (line 63) printed out the user speeds on 1 line. I have provided a simple fix to this, by just appending a newline to each entry when it is printed to the file: (So line 63 should read) print TCACHE map { join(":", @$_) . "\n" } @speeds; Thanks Justin Victor