Hi again,
most (all?) of the OTRS modules incorporate define $VERSION as the CVS
revision of the file.
I doubt that $VERSION is currently being used to declare version dependencies,
but should it ever be, we could experience an unpleasant surprise:
Trying to include this example module
--------------------
package module;
use strict;
use warnings;
our $VERSION = 1.32;
1;
---------------------
yields the following results:
[EMAIL PROTECTED]:~/Sources/temp/test> perl -e 'use module;'
[EMAIL PROTECTED]:~/Sources/temp/test> perl -e 'use module 1.32;'
[EMAIL PROTECTED]:~/Sources/temp/test> perl -e 'use module 1.33;'
module version 1.33 required--this is only version 1.32 at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
[EMAIL PROTECTED]:~/Sources/temp/test> perl -e 'use module 1.101;'
So from Perl's point-of-view, $VERSION 1.101 is smaller than 1.32. While that
could be expected, it is not quite what we need, as CVS revisions reach into
the thousands, easily.
Additionally, with CVS we'd have to cope with the branch-revisions having a
different, more complicated format (e.g. 1.465.2.62).
So we should probably make up our mindes if we should drop the idea of
checking $VERSION of our own modules (and perhaps drop the definition of
$VERSION from all modules to force that) or if we should move the contents of
$VERSION to a different format that does not depend on the CVS revision.
So - what is the exact purpose of $VERSION in our own modules?
Anyway, just to share what I found out after a discussion with Thomas.
cheers,
Oliver
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev