Only modules, and only those that are pressed on CPAN, really benefit from specifying $VERSION . There is not much use for it in a script, except to use a familiar name, and not invent a new one if you want a version of the script to be available.
Primary use:
CPAN uses it as a distribution version, allowing it to index different versions of the same distribution.
cpan and cpanm use it to verify that the installed module is installed high enough to match the required minimum version of the dependency.
As brian d foy mentioned, it can also be checked with use Foo 1.23; but most people avoid this in favor of specifying the required version of the dependencies in their meta meta data. This allows cpan and cpanm update the dependency if necessary (where use using use Foo 1.23; will cause the installation to fail during testing). Due to the lack of using the function, this is hardly the main advantage.
ikegami
source share