in reply to Re^2: Is VERSION > 999 allowed?
in thread Is VERSION > 999 allowed?
Meanwhile, yes the CPAN tooling does manually parse out your version rather than evaling untrusted code. One thing I have done to solve similar problems (where I needed there to be a version for testing but was injecting the real version as dist build time) was put
So, let the real one come first, then apply one if it doesn't exist. Maybe just to be *really* sure tooling can't parse the bogus version, you could write it as a harder-to-parse expression, before 'use strict':# VERSION $MYPACKAGE::VERSION ||= '999';
package MYPACKAGE; # VERSION ${ __PACKAGE__ . '::VER' . 'SION' } ||= 2**10; use strict;
Oh! HAH, I remember now, I stopped doing that because I contributed the 'overwrite' option, which allows you to write
[OurPkgVersion] overwrite = 1
and it just gets overwritten with the real version when released.package MYPACKAGE; our $VERSION= '999'; # VERSION
|
|---|