]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 618161: Make VERSION into a constant in two included extensions so that
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Sun, 12 Dec 2010 18:56:15 +0000 (10:56 -0800)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Sun, 12 Dec 2010 18:56:15 +0000 (10:56 -0800)
calling $class->VERSION on them won't throw an error on Perl 5.12 when there
are non-numeric characters in BUGZILLA_VERSION.
r=LpSolit, a=LpSolit

extensions/OldBugMove/Extension.pm
extensions/Voting/Extension.pm

index 3aca16a5739274ee7b4cf5bb0d8dcfe711752924..b12d36a9aad25e4827b8159374ecd8b69d5d8ab4 100644 (file)
@@ -32,12 +32,12 @@ use Bugzilla::Util qw(trim);
 use Scalar::Util qw(blessed);
 use Storable qw(dclone);
 
+use constant VERSION => BUGZILLA_VERSION;
+
 # This is 4 because that's what it originally was when this code was
 # a part of Bugzilla.
 use constant CMT_MOVED_TO => 4;
 
-our $VERSION = BUGZILLA_VERSION;
-
 sub install_update_db {
     my $reso_type = Bugzilla::Field::Choice->type('resolution');
     my $moved_reso = $reso_type->new({ name => 'MOVED' });
index 74e3270981f9272929e3e387d6b86a36d412a3a8..d94ff84300ff97997015de4098a84e97f2409fac 100644 (file)
@@ -40,6 +40,7 @@ use Bugzilla::Util qw(detaint_natural);
 use List::Util qw(min);
 
 use constant NAME => 'Voting';
+use constant VERSION => BUGZILLA_VERSION;
 use constant DEFAULT_VOTES_PER_BUG => 1;
 # These came from Bugzilla itself, so they maintain the old numbers
 # they had before.
@@ -50,8 +51,6 @@ use constant REL_VOTER => 4;
 # Installation #
 ################
 
-our $VERSION = BUGZILLA_VERSION;
-
 sub db_schema_abstract_schema {
     my ($self, $args) = @_;
     $args->{'schema'}->{'votes'} = {