Subject: | our SVERSION |
Hi,
We use Test::Perl::Critic extensively to maintain our code standards.
Within this, $VERSION should be a constant, using Readonly. However,
when I try to run Build.PL using Module::Build 0.3603, I get the
following on modules that are required in Build.PL.
(I am running perl 5.10.1 on MacOSXLeopard)
Error evaling version line 'BEGIN { q# Hide from _packages_inside()
#; package Module::Build::ModuleInfo::_version::p8;
use Module::Build::Version;
no strict;
local $VERSION;
$VERSION=undef;
$vsub = sub {
Readonly::Scalar our $VERSION => do { my ($r) =
q$LastChangedRevision: 8212 $ =~ /(\d+)/mxs; $r; };;
$VERSION
};
}' in
/Users/ajb/dev/new-pipeline-dev/useful_modules/branches/current/lib/npg_common/roles/log.pm:
syntax error at (eval 31) line 9, near "Readonly::Scalar our "
BEGIN not safe after errors--compilation aborted at (eval 31) line 11,
<GEN7> line 19.
failed to build version sub for
/Users/ajb/dev/new-pipeline-dev/useful_modules/branches/current/lib/npg_common/roles/log.pm
at /Users/ajb/dev/perl/5.10.1/lib/5.10.1/Module/Build/ModuleInfo.pm line
332, <GEN7> line 19.
Couldn't run Build.PL: No such file or directory at
/Users/ajb/dev/perl/5.10.1/lib/5.10.1/Module/Build/Compat.pm line 335.
and a similar issue if my modules in the package also use
Readonly::Scalar our SVERSION => 0.1;
I don't know if others would have a similar problem, but is is not
helpful for us to have to go around PerlCritic standards.
Thanks for providing a really useful package for distribution and
deployment. I hope that you can help out here.
Cheers
Andy