On Jun 2, 2016, at 00:56, Karl Williamson <public@khwilliamson.com> wrote: > > qr/ ^ * /x warns instead with "^ * matches null string many times", and generates code that will run a very long time. It seems to have been fixed, or at least optimized. It's also important to note that the warning happens when the regular expression is compiled. A module returning patterns as strings would give its users the ability to toggle these warnings. A module returning compiled regular expressions would need to decide for its users. % /usr/bin/time -p perl -le 'use warnings; use strict; my $r = qr/ ^ * /x; my $s = "string"; print $s =~ $r; ' ^ * matches null string many times in regex; marked by <-- HERE in m/ ^ * <-- HERE / at -e line 3. 1 real 0.01 user 0.00 sys 0.00 -- Rocco Caputo <rcaputo@pobox.com>Thread Previous | Thread Next