Re: Proper technique for setting a project-wide $VERSION?

Jozef Kutej <[email protected]> Wed, 24 Feb 2010 16:44:56 +0100
Newsgroups gmane.comp.lang.perl.modules.module-build
Message-ID <[email protected]>
brian d foy wrote:
> In article <[email protected]>, Michael G Schwern
> <[email protected]> wrote:
> 
>> And other .pm files do:
>>
>>      use perl5i::VERSION; our $VERSION = perl5i::VERSION->VERSION;
> 
> I'd rather see explicit versions in the code just so I can see a file
> and know what version it is without running code or having the rest of
> the distribution.

I use this find:

find lib -name *.pm -exec \
perl -lane 's/^(our \$VERSION = )(.)[\d._]+\2;/$1${2}0.05$2;/; print;' -i {} \;

to update all "our $VERSION = '0.xy'" to "0.05" in all .pm files in distribution
folder.

Jozef