<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font size="-1">Ben provided the answer. I just hadn't looked hard
      enough. My local starman was using /usr/bin/perl.<br>
      <br>
      Gary<br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 18/02/2014 12:55 pm, Gary Smith
      wrote:<br>
    </div>
    <blockquote cite="mid:5302BD76.8090700@devgurus.com" type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <font size="-1">Yep - that's what is happening. I have 5.16.3
        installed with perlbrew and everything in my environment tells
        me that it's being used. But when the main script runs it's
        managing to use the system perl in /usr/bin which is 5.10.<br>
        <br>
        gary@intertradedocs:~$ perl -E 'say join $/, @INC'<br>
        /home/gary/perl5/lib/perl5/x86_64-linux<br>
        /home/gary/perl5/lib/perl5<br>
/home/gary/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux<br>
        /home/gary/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3<br>
/home/gary/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/x86_64-linux<br>
        /home/gary/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3<br>
        .<br>
        gary@intertradedocs:~$ which perl<br>
        /home/gary/perl5/perlbrew/perls/perl-5.16.3/bin/perl<br>
        <br>
        Gary<br>
        <br>
        <br>
      </font>
      <div class="moz-cite-prefix">On 18/02/2014 12:03 pm, Ben Hare
        wrote:<br>
      </div>
      <blockquote
cite="mid:CALOH2dUkisu9uJvrcGiPJhZ7edC87BAQWD7_XTZmb1hD_BBvvA@mail.gmail.com"
        type="cite">
        <pre wrap="">On 17 February 2014 17:33, Myf White <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:myfwhite@gmail.com"><myfwhite@gmail.com></a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">I think the /u modifier for unicode was introduced in 5.14

Kind Regards,
Myf White

Email: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:myfwhite@gmail.com">myfwhite@gmail.com</a>


On Mon, Feb 17, 2014 at 5:57 PM, Sam Watkins <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:sam@nipl.net"><sam@nipl.net></a> wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">I don't know what your /u
u modifier is meant to be, but it doesn't work for me and causes that
error in perl v5.10.

</pre>
          </blockquote>
        </blockquote>
        <pre wrap="">app using wrong ( older ) perl?

Ben.


</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">So I guess that 'u' modifier is your problem.

Sam

On Mon, Feb 17, 2014 at 11:40:34AM +1100, Gary Smith wrote:
</pre>
            <blockquote type="cite">
              <pre wrap="">Hi All,

I'm seeing an error in a file here but I think it may be related to
the development environment rather than the file. The reason I say
that is because the error only occurs in the environment that I have
created (with perlbrew) for myself. The production environment
doesn't exhibit the same error and I also use this same code on a
Debian VM without issue.

Perl version is 5.16.3

The environment is Catalyst/Pg/Starman.

Here is the error output:

Bareword found where operator expected at
/home/gary/myapp/lib/myapp/Controller/Lookup.pm line 59, near "/^
\s* ( [\s\d\w]{3,} ) \s* $/ux"
        (Missing operator before ux?)
Error while loading /home/gary/myapp/myapp.psgi: syntax error at
/home/gary/myapp/lib/myapp/Controller/Lookup.pm line 59, near "/^
\s* ( [\s\d\w]{3,} ) \s* $/ux"
Can't use global $1 in "my" at
/home/gary/myapp/lib/myapp/Controller/Lookup.pm line 60, near "= $1"
BEGIN not safe after errors--compilation aborted at
/home/gary/myapp/lib/myapp/Controller/Lookup.pm line 73.
Compilation failed in require at
/home/gary/perl5/lib/perl5/Catalyst/Utils.pm line 308.
Compilation failed in require at /home/gary/myapp/myapp.psgi line 4.
BEGIN failed--compilation aborted at /home/gary/myapp/myapp.psgi line 4.


Here is the relevant code lines 59 & 60 in Lookup.pm:

        if ($c->request->params->{$field} =~ /^ \s* ( [\s\d\w]{3,} )
\s* $/ux) {
            my $value = $1;


I know that the code is fine as it has been working fine for many
months and still works fine on the production and Debian servers. I
don't know what in my environment would cause the error. It appears
to be saying that it doesn't like the regex, but there doesn't
appear to be any syntax issues there.

Regards,

Gary
</pre>
            </blockquote>
            <blockquote type="cite">
              <pre wrap="">_______________________________________________
Melbourne-pm mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/melbourne-pm">http://mail.pm.org/mailman/listinfo/melbourne-pm</a>
</pre>
            </blockquote>
            <pre wrap="">_______________________________________________
Melbourne-pm mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/melbourne-pm">http://mail.pm.org/mailman/listinfo/melbourne-pm</a>
</pre>
          </blockquote>
          <pre wrap="">

_______________________________________________
Melbourne-pm mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/melbourne-pm">http://mail.pm.org/mailman/listinfo/melbourne-pm</a>
</pre>
        </blockquote>
        <pre wrap="">

</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Melbourne-pm mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a>
<a class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/melbourne-pm">http://mail.pm.org/mailman/listinfo/melbourne-pm</a></pre>
    </blockquote>
    <br>
  </body>
</html>