On Sun, Sep 13, 2009 at 10:45 AM, Jerry D. Hedden <jdhed...@cpan.org> wrote: >> package Workflow; >> use Workflow::VERSION; >> $Workflow::VERSION = $Workflow::VERSION::VERSION; > > This sort of strategy caused problems with the CPANPLUS module code > awhile back in that the 'cpan->r' command showed its submodules to > have no version numbers. Not sure if that's all been fixed now, but > it did illustrate to me that trying to set versions via a version > module is not a robust scheme.
I suspect that to work correctly with ExtUtils::MM->parse_version (the canonical way to get a module version without actually loading the module), it would need to be like this: package Workflow; use Workflow::VERSION; $Workflow::VERSION=$Workflow::VERSION::VERSION; parse_version() does an eval() on a single line. This is why there is the idiom for version.pm: use version; our $VERSION = version->new("v1.2.3"); -- David