http://www.perlmonks.org?node_id=692180


in reply to Re^2: Perl module search engine
in thread Perl module search engine

...endlessly backtracking regexes.

Could you please provide an example? I would like to investigate it and see if there's a problem. Thanks.

I always envisioned HTML::Perlinfo::Modules as something Perl developers might use, not the general public (which is why I wasn't too concerned that the HTML was absolutely perfect). You know, something you could install in your local intranet to see what's on your system.

Replies are listed 'Best First'.
Re^4: Perl module search engine
by moritz (Cardinal) on Jun 15, 2008 at 21:48 UTC
    Could you please provide an example?
    perl -wle '$_="abc" x $ARGV[0]; m/(((.){1,20}.+){1,34}){2,4}[d]/' 10

    And now tell me how long your perl takes to find out that this regex fails ;-)
    $ARGV[0]time in s
    30.003
    40.016
    50.167
    62.0
    723.8
    8146

    I wasn't patient enough to see how long it takes to match with $ARGV[0] == 9, or in other words against 27 characters of input.

      Yes, it's a problem. I just tested your example. I am going to have to figure out a way to sniff it out and upload a new version. Maybe I should just not allow regexps? Thanks for the info.