diff --git a/extensions/Example/template/en/default/setup/strings.txt.pl b/extensions/Example/template/en/default/setup/strings.txt.pl index 6ee4b5fdcc..01b3edd90b 100644 --- a/extensions/Example/template/en/default/setup/strings.txt.pl +++ b/extensions/Example/template/en/default/setup/strings.txt.pl @@ -17,6 +17,9 @@ # Contributor(s): # Max Kanat-Alexander +# This file is loaded inside a Safe compartment, so keep it as plain package +# data: do not add strict/warnings pragmas or lexical %strings declarations. + %strings = (feature_example_acme => 'Example Extension: Acme Feature',); 1; diff --git a/extensions/OldBugMove/Config.pm b/extensions/OldBugMove/Config.pm index e401260469..d2ecc4d249 100644 --- a/extensions/OldBugMove/Config.pm +++ b/extensions/OldBugMove/Config.pm @@ -20,6 +20,10 @@ # Max Kanat-Alexander package Bugzilla::Extension::OldBugMove; + +use 5.14.0; use strict; +use warnings; + use constant NAME => 'OldBugMove'; __PACKAGE__->NAME; diff --git a/extensions/OldBugMove/Extension.pm b/extensions/OldBugMove/Extension.pm index aa3d1aab0e..fae5a4e5ed 100644 --- a/extensions/OldBugMove/Extension.pm +++ b/extensions/OldBugMove/Extension.pm @@ -20,7 +20,11 @@ # Max Kanat-Alexander package Bugzilla::Extension::OldBugMove; + +use 5.14.0; use strict; +use warnings; + use base qw(Bugzilla::Extension); use Bugzilla::Constants; use Bugzilla::Error; diff --git a/extensions/OldBugMove/lib/Params.pm b/extensions/OldBugMove/lib/Params.pm index cea3fecf66..46a9aea118 100644 --- a/extensions/OldBugMove/lib/Params.pm +++ b/extensions/OldBugMove/lib/Params.pm @@ -31,7 +31,9 @@ package Bugzilla::Extension::OldBugMove::Params; +use 5.14.0; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/extensions/Push/template/en/default/setup/strings.txt.pl b/extensions/Push/template/en/default/setup/strings.txt.pl index a2a1a1a577..874b3c466b 100644 --- a/extensions/Push/template/en/default/setup/strings.txt.pl +++ b/extensions/Push/template/en/default/setup/strings.txt.pl @@ -5,9 +5,8 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. -use strict; -use warnings; -use 5.14.0; +# This file is loaded inside a Safe compartment, so keep it as plain package +# data: do not add strict/warnings pragmas or lexical %strings declarations. %strings = ( feature_push_amqp => 'Push: AMQP Support', diff --git a/extensions/ShadowBugs/Config.pm b/extensions/ShadowBugs/Config.pm index a45948dd4a..9fa46988a8 100644 --- a/extensions/ShadowBugs/Config.pm +++ b/extensions/ShadowBugs/Config.pm @@ -6,7 +6,10 @@ # defined by the Mozilla Public License, v. 2.0. package Bugzilla::Extension::ShadowBugs; + +use 5.14.0; use strict; +use warnings; use constant NAME => 'ShadowBugs'; use constant REQUIRED_MODULES => []; diff --git a/extensions/ShadowBugs/Extension.pm b/extensions/ShadowBugs/Extension.pm index 28693c07ee..5337c98886 100644 --- a/extensions/ShadowBugs/Extension.pm +++ b/extensions/ShadowBugs/Extension.pm @@ -7,7 +7,9 @@ package Bugzilla::Extension::ShadowBugs; +use 5.14.0; use strict; +use warnings; use base qw(Bugzilla::Extension); diff --git a/t/Support/Files.pm b/t/Support/Files.pm index 21f2786d08..626eedb437 100644 --- a/t/Support/Files.pm +++ b/t/Support/Files.pm @@ -30,8 +30,13 @@ our @extensions = grep { $_ ne 'extensions/create.pl' && !-e "$_/disabled" } glob('extensions/*'); foreach my $extension (@extensions) { - find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/; }, - $extension); + find( + sub { + return if $File::Find::name =~ m{^extensions/.+/template/}; + push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/; + }, + $extension + ); } our @test_files = glob('t/*.t xt/*/*.t'); diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index b246fe7372..d118df6215 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -23,6 +23,9 @@ # and so do not need to be added here. Doing so will cause warnings. # See 008filter.t for more details. # +# This file is loaded by 008filter.t with do(), so keep it as plain package +# data and avoid strict/warnings pragmas or lexical variable declarations. +# # Comments - [%#... # Directives - [% IF|ELSE|UNLESS|FOREACH... # Assignments - [% foo = ... diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 54974aadb3..1627e1f70b 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -9,6 +9,9 @@ # installation code to display strings before Template-Toolkit can safely # be loaded. # +# This file is loaded inside a Safe compartment, so keep it as plain package +# data: do not add strict/warnings pragmas or lexical %strings declarations. +# # Each string supports a very simple substitution system, where you can # have variables named like ##this## and they'll be replaced by the string # variable with that name.