Subject: | WWW-RobotRules-Extended-0.02 |
Date: | Mon, 14 May 2012 10:07:11 +0100 |
To: | bug-WWW-RobotRules-Extended [...] rt.cpan.org |
From: | Tielman de Villiers <tvilliers [...] gmail.com> |
Hello,
The regexp replacement for literal "." at the bottom means "$rule=~
s/\*/\.*/g" gets double escaped, so moving it to before "*" solves the
problem:
--- /home/ubuntu/.cpanm/latest-build/WWW-RobotRules-Extended/lib/WWW/RobotRules/Extended.pm
2011-12-24 16:55:21.000000000 +0000
+++ /usr/local/share/perl/5.12.4/WWW/RobotRules/Extended.pm
2012-05-14 08:51:43.742878108 +0000
@@ -183,11 +183,11 @@
# for instance : /shared/* => ^\/shared\/.*
my $rule = "^".$allowdisallow;
$rule=~ s/\//\\\//g;
+ $rule=~ s/\./\\./g;
$rule=~ s/\*/\.*/g;
$rule=~ s/\[/\\[/g;
$rule=~ s/\]/\\]/g;
$rule=~ s/\?/\\?/g;
- $rule=~ s/\./\\./g;
if (length $allowdisallow) {
if ($is_me) {
Thanks,
--tvilliers