[sf-perl] trying to constantize a compiled regex

Tatsuhiko Miyagawa miyagawa at gmail.com
Wed Feb 20 18:25:27 PST 2008

On Wed, Feb 20, 2008 at 6:18 PM, David Alban <extasia at extasia.org> wrote:

>  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa does not match $VAR1 = qr/(?-xism: m{
>  \A [a-f\d]{32} \z }xms )/;
>      # an md5sum should match this regular expression
>  Readonly::Scalar my $MD5SUM_RGX => qr{ m{ \A [a-f\d]{32} \z }xms };

Take a look at what perl says. it has "m{ }xms" inside the regexp.
Since it's wrapped in qr{} already, you don't need it.

  Readonly::Scalar my $MD5SUM_RGX => qr{ \A [a-f\d]{32} \z }xms;

should do that.

Tatsuhiko Miyagawa

More information about the SanFrancisco-pm mailing list