How can I manage versions of my Perl Moose objects?

I'm a newbie Mooseand I wonder if the general

our $VERSION = "0.001";
$VERSION = eval $VERSION;

should also be used in Moose packages, or Moosehas an alternative version control method. Could not find link in Moosedocs.

+3
source share
1 answer

As with all perl packages, it is generally recommended to have $VERSIONone defined in them. This allows other things to properly depend on their version with all the necessary functions, either by declaring a dependency in them Makefile.PL, or equivalently, or directly when loading a module with use SomeModule 1.23;.

eval, , - kludge. . $VERSION . , - 0.001 , , - 0.001_01 .

eval , , , PAUSE, Perl Authors Upload SErver, extract. , 0.001_01 is not numeric in ....

. , . , , tar , CPAN -TRIAL.

, My-Distribution-0.001.tar.gz, My-Distribution-0.001-TRIAL.tar.gz. CPAN . , -TRIAL $VERSION, tarball. eval .

, $VERSION. perl 5.12.0, :

package My::Package 0.001;

Moose - .

+10

Source: https://habr.com/ru/post/1767784/


All Articles