From: Max Kanat-Alexander Date: Sun, 12 Dec 2010 18:56:15 +0000 (-0800) Subject: Bug 618161: Make VERSION into a constant in two included extensions so that X-Git-Tag: bugzilla-4.0rc2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28ba3df8f991eaf0bbbc21bee99adc908332f729;p=thirdparty%2Fbugzilla.git Bug 618161: Make VERSION into a constant in two included extensions so that 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 --- diff --git a/extensions/OldBugMove/Extension.pm b/extensions/OldBugMove/Extension.pm index 3aca16a573..b12d36a9aa 100644 --- a/extensions/OldBugMove/Extension.pm +++ b/extensions/OldBugMove/Extension.pm @@ -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' }); diff --git a/extensions/Voting/Extension.pm b/extensions/Voting/Extension.pm index 74e3270981..d94ff84300 100644 --- a/extensions/Voting/Extension.pm +++ b/extensions/Voting/Extension.pm @@ -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'} = {