in reply to Re: Bareword error in WWW::Mechanize
in thread WWW::Mechanize “use constant xx” gets bareword error

use constant is_perl55 => ($] < 5.005_50); use constant is_perl56 => ($] < 5.007 && $] > 5.005_50); use constant is_sane_perl => $] > 5.007;

Weird. The "fat comma" ("=>") quotes its left hand side, so strict shouldn't complain. Looks like your perl is broken. Did your Win10 do any updates lately? Carefully check C:/Perl64/lib/ExtUtils/Constant/Utils.pm for any weirdness, and you could move the original file out of the way, make a copy and quote the LHS of the arguments to use, e.g.

use constant 'is_perl55' => ($] < 5.005_50); use constant 'is_perl56' => ($] < 5.007 && $] > 5.005_50); use constant 'is_sane_perl' => $] > 5.007;

If that fixes the issue, it is time to file a bug report to ActiveState.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^3: Bareword error in WWW::Mechanize
by Anonymous Monk on Nov 28, 2017 at 18:19 UTC

    I tried quoting as you suggested and it fixed this instance. From there the same condition (and fix) continued in other modules until I gave up. I reinstalled ActivePerl and the problem did not go away.

    Any ideas to try? Or should I contact ActivePerl?

    The last windows update was two weeks prior to the problem, so I don’t think that is an issue.

    Do you think It is worth trying the 32-bit version?

      Try Strawberry perl, they even have a portable edition. It a sane distribution for Windows and ships with a proper toolchain and lots of additional, handy modules and tools.

Re^3: Bareword error in WWW::Mechanize
by Anonymous Monk on Nov 28, 2017 at 10:01 UTC
    Not enough info provided to conclude anything other than more info is need, version info as provided by Devel::Modlist