<div dir="ltr">I think the /u modifier for unicode was introduced in 5.14<br><div class="gmail_extra"><br clear="all"><div>Kind Regards,<br>Myf White<br><b style="color:rgb(102,102,102)"><br>Email:</b><span style="color:rgb(102,102,102)"> </span><a href="mailto:myfwhite@gmail.com" target="_blank">myfwhite@gmail.com</a></div>


<br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 5:57 PM, Sam Watkins <span dir="ltr"><<a href="mailto:sam@nipl.net" target="_blank">sam@nipl.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

I don't know what your /u<br>
u modifier is meant to be, but it doesn't work for me and causes that<br>
error in perl v5.10.<br>
<br>
So I guess that 'u' modifier is your problem.<br>
<br>
Sam<br>
<div><div class="h5"><br>
On Mon, Feb 17, 2014 at 11:40:34AM +1100, Gary Smith wrote:<br>
> Hi All,<br>
><br>
> I'm seeing an error in a file here but I think it may be related to<br>
> the development environment rather than the file. The reason I say<br>
> that is because the error only occurs in the environment that I have<br>
> created (with perlbrew) for myself. The production environment<br>
> doesn't exhibit the same error and I also use this same code on a<br>
> Debian VM without issue.<br>
><br>
> Perl version is 5.16.3<br>
><br>
> The environment is Catalyst/Pg/Starman.<br>
><br>
> Here is the error output:<br>
><br>
> Bareword found where operator expected at<br>
> /home/gary/myapp/lib/myapp/Controller/Lookup.pm line 59, near "/^<br>
> \s* ( [\s\d\w]{3,} ) \s* $/ux"<br>
>         (Missing operator before ux?)<br>
> Error while loading /home/gary/myapp/myapp.psgi: syntax error at<br>
> /home/gary/myapp/lib/myapp/Controller/Lookup.pm line 59, near "/^<br>
> \s* ( [\s\d\w]{3,} ) \s* $/ux"<br>
> Can't use global $1 in "my" at<br>
> /home/gary/myapp/lib/myapp/Controller/Lookup.pm line 60, near "= $1"<br>
> BEGIN not safe after errors--compilation aborted at<br>
> /home/gary/myapp/lib/myapp/Controller/Lookup.pm line 73.<br>
> Compilation failed in require at<br>
> /home/gary/perl5/lib/perl5/Catalyst/Utils.pm line 308.<br>
> Compilation failed in require at /home/gary/myapp/myapp.psgi line 4.<br>
> BEGIN failed--compilation aborted at /home/gary/myapp/myapp.psgi line 4.<br>
><br>
><br>
> Here is the relevant code lines 59 & 60 in Lookup.pm:<br>
><br>
>         if ($c->request->params->{$field} =~ /^ \s* ( [\s\d\w]{3,} )<br>
> \s* $/ux) {<br>
>             my $value = $1;<br>
><br>
><br>
> I know that the code is fine as it has been working fine for many<br>
> months and still works fine on the production and Debian servers. I<br>
> don't know what in my environment would cause the error. It appears<br>
> to be saying that it doesn't like the regex, but there doesn't<br>
> appear to be any syntax issues there.<br>
><br>
> Regards,<br>
><br>
> Gary<br>
<br>
</div></div>> _______________________________________________<br>
> Melbourne-pm mailing list<br>
> <a href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a><br>
> <a href="http://mail.pm.org/mailman/listinfo/melbourne-pm" target="_blank">http://mail.pm.org/mailman/listinfo/melbourne-pm</a><br>
<br>
_______________________________________________<br>
Melbourne-pm mailing list<br>
<a href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/melbourne-pm" target="_blank">http://mail.pm.org/mailman/listinfo/melbourne-pm</a><br>
</blockquote></div><br></div></div>