[Html-widget] Patch: regexy characters and valid

Carl Franks fireartist at gmail.com
Mon Aug 28 23:04:22 CEST 2006


If no-one else gets to this first, I'll take a look at it next week -
as I'm leaving for YAPC::europe tomorrow, and I'm not at a dev machine
with svn right now.

Thanks,
Carl


On 28/08/06, Ted Carnahan <ted at tedcarnahan.com> wrote:
> Attached is a patch that quotes regexy characters (like square brackets)
> in field names in HTML::Widget::Result::valid.
>
> - Ted Carnahan
> ted at tedcarnahan.com
>
>
>
> Index: Widget/Result.pm
> ===================================================================
> --- Widget/Result.pm    (revision 68)
> +++ Widget/Result.pm    (working copy)
> @@ -366,7 +366,7 @@
>      }
>      my @valid = keys %valid;
>      return @valid unless $name;
> -    return 1 if grep { /$name/ } @valid;
> +    return 1 if grep { /\Q$name\E/ } @valid;
>      return 0;
>  }
>
>
>
> _______________________________________________
> Html-widget mailing list
> Html-widget at lists.rawmode.org
> http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget
>
>
>



More information about the Html-widget mailing list