From 9122057ece6097f89b13ed847a691f5dd0ed6476 Mon Sep 17 00:00:00 2001 From: Paul Cochrane Date: Mon, 7 Sep 2015 12:45:31 +0200 Subject: [PATCH 1/2] Add strictures to test files Although warnings were switched on via the `-w` flag to perl, explicitly using strict and warnings matches current best practice and is more platform independent. --- t/Autobase.t | 6 +++++- t/CompCalls.t | 6 +++++- t/Compilation.t | 6 +++++- t/ComponentMeta.t | 6 +++++- t/Defer.t | 6 +++++- t/DollarDot.t | 6 +++++- t/Errors.t | 6 +++++- t/Filters.t | 6 +++++- t/Globals.t | 6 +++++- t/Interp.t | 6 +++++- t/LvalueAttributes.t | 6 +++++- t/Plugins.t | 6 +++++- t/Reload.t | 6 +++++- t/Request.t | 6 +++++- t/ResolveURI.t | 6 +++++- t/Sanity.t | 6 +++++- t/Sections.t | 6 +++++- t/StaticSource.t | 6 +++++- t/Syntax.t | 6 +++++- t/Util.t | 6 +++++- 20 files changed, 100 insertions(+), 20 deletions(-) diff --git a/t/Autobase.t b/t/Autobase.t index 6a10b800..60044bcd 100644 --- a/t/Autobase.t +++ b/t/Autobase.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Autobase; Mason::t::Autobase->runtests; diff --git a/t/CompCalls.t b/t/CompCalls.t index 70cc7ef9..f8cb3a28 100644 --- a/t/CompCalls.t +++ b/t/CompCalls.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::CompCalls; Mason::t::CompCalls->runtests; diff --git a/t/Compilation.t b/t/Compilation.t index 14add316..463493de 100644 --- a/t/Compilation.t +++ b/t/Compilation.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Compilation; Mason::t::Compilation->runtests; diff --git a/t/ComponentMeta.t b/t/ComponentMeta.t index 374d2422..fba0c4f1 100644 --- a/t/ComponentMeta.t +++ b/t/ComponentMeta.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::ComponentMeta; Mason::t::ComponentMeta->runtests; diff --git a/t/Defer.t b/t/Defer.t index 00a6cacb..9aa9e075 100644 --- a/t/Defer.t +++ b/t/Defer.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Defer; Mason::t::Defer->runtests; diff --git a/t/DollarDot.t b/t/DollarDot.t index 1f5bf6c7..91df1fec 100644 --- a/t/DollarDot.t +++ b/t/DollarDot.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::DollarDot; Mason::t::DollarDot->runtests; diff --git a/t/Errors.t b/t/Errors.t index f6aa9152..413f016a 100644 --- a/t/Errors.t +++ b/t/Errors.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Errors; Mason::t::Errors->runtests(); diff --git a/t/Filters.t b/t/Filters.t index 47a12d1c..56d7003b 100644 --- a/t/Filters.t +++ b/t/Filters.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Filters; Mason::t::Filters->runtests; diff --git a/t/Globals.t b/t/Globals.t index 0a72d121..3b59d08a 100644 --- a/t/Globals.t +++ b/t/Globals.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Globals; Mason::t::Globals->runtests; diff --git a/t/Interp.t b/t/Interp.t index 499cd40d..5749f264 100644 --- a/t/Interp.t +++ b/t/Interp.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Interp; Mason::t::Interp->runtests(); diff --git a/t/LvalueAttributes.t b/t/LvalueAttributes.t index 9aadda54..d1792202 100644 --- a/t/LvalueAttributes.t +++ b/t/LvalueAttributes.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::LvalueAttributes; Mason::t::LvalueAttributes->runtests; diff --git a/t/Plugins.t b/t/Plugins.t index 35723f6f..2963610d 100644 --- a/t/Plugins.t +++ b/t/Plugins.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Plugins; Mason::t::Plugins->runtests; diff --git a/t/Reload.t b/t/Reload.t index 1e75b7a9..b6cb2e7c 100644 --- a/t/Reload.t +++ b/t/Reload.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Reload; Mason::t::Reload->runtests(); diff --git a/t/Request.t b/t/Request.t index 9b6084b4..567554fb 100644 --- a/t/Request.t +++ b/t/Request.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Request; Mason::t::Request->runtests; diff --git a/t/ResolveURI.t b/t/ResolveURI.t index 747ea20a..14f0eab4 100644 --- a/t/ResolveURI.t +++ b/t/ResolveURI.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::ResolveURI; Mason::t::ResolveURI->runtests; diff --git a/t/Sanity.t b/t/Sanity.t index 65e7bef8..64d2ba8c 100644 --- a/t/Sanity.t +++ b/t/Sanity.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Sanity; Mason::t::Sanity->runtests; diff --git a/t/Sections.t b/t/Sections.t index 497539c8..a461aa64 100644 --- a/t/Sections.t +++ b/t/Sections.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Sections; Mason::t::Sections->runtests(); diff --git a/t/StaticSource.t b/t/StaticSource.t index 490bc4c2..f91e3260 100644 --- a/t/StaticSource.t +++ b/t/StaticSource.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::StaticSource; Mason::t::StaticSource->runtests; diff --git a/t/Syntax.t b/t/Syntax.t index 252ec437..0105966b 100644 --- a/t/Syntax.t +++ b/t/Syntax.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Syntax; Mason::t::Syntax->runtests(); diff --git a/t/Util.t b/t/Util.t index 6a75bba2..6b4b3e6b 100644 --- a/t/Util.t +++ b/t/Util.t @@ -1,3 +1,7 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Mason::t::Util; Mason::t::Util->runtests; From f58ea877248ef277f09e8642e34ff952c7565d39 Mon Sep 17 00:00:00 2001 From: Paul Cochrane Date: Mon, 7 Sep 2015 12:47:05 +0200 Subject: [PATCH 2/2] Add strictures and warnings to leaks author test --- xt/author/leaks.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xt/author/leaks.t b/xt/author/leaks.t index 41f8d1c0..56c731dd 100644 --- a/xt/author/leaks.t +++ b/xt/author/leaks.t @@ -1,4 +1,8 @@ -#!perl -w +#!perl + +use strict; +use warnings; + use Devel::LeakGuard::Object qw(leakguard); use File::Path qw(mkpath); use File::Temp qw(tempdir);