Skip Menu |

This queue is for tickets about the DateTime-Format-Duration CPAN distribution.

Report information
The Basics
Id: 97667
Status: resolved
Priority: 0/
Queue: DateTime-Format-Duration

Owner: ether [...]
Requestors: l.mai [...]

Bug Information
Severity: Important
Broken in: 1.03a
Fixed in: 1.04

Subject: Use of $& slows down all programs using DateTime::Format::Duration
Download (untitled) / with headers
text/plain 582b
DateTime::Format::Duration line 597: croak("Unknown symbols in parse: $&") if $field_list=~/(\%\w)/g; (I'm pretty sure the /g flag is wrong here, but that's not the point.) This line uses the special variable $& which slows down all regex matches in all programs that (directly or indirectly) use this module. See$MATCH for details. Simply changing $& to $1 in that line improved the runtime of a particularly regex-heavy program from 23s down to 15s. It would be good if you could make that change to the official release on CPAN.
Fixed in 1.04 release.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to