diff --git a/t/bare_glob_filehandle.t b/t/bare_glob_filehandle.t index e7fac9f..c83669b 100644 --- a/t/bare_glob_filehandle.t +++ b/t/bare_glob_filehandle.t @@ -1,6 +1,7 @@ +use strict; +use warnings; use Test::More tests => 2; use XML::Parser; -use strict; # Test that bare glob filehandles (*FH) work with parse(). # See https://github.com/cpan-authors/XML-Parser/issues/201 diff --git a/t/current_byte.t b/t/current_byte.t index 9439a10..dc3c521 100644 --- a/t/current_byte.t +++ b/t/current_byte.t @@ -1,3 +1,5 @@ +use strict; +use warnings; use Test::More tests => 4; use XML::Parser; diff --git a/t/file.t b/t/file.t index d87e0a3..771d55a 100644 --- a/t/file.t +++ b/t/file.t @@ -1,10 +1,11 @@ - +use strict; +use warnings; use Test::More tests => 1; use XML::Parser; my $count = 0; -$parser = XML::Parser->new( ErrorContext => 2 ); +my $parser = XML::Parser->new( ErrorContext => 2 ); $parser->setHandlers( Comment => sub { $count++; } ); $parser->parsefile('samples/REC-xml-19980210.xml'); diff --git a/t/file_open_scalar.t b/t/file_open_scalar.t index 0aa1a8d..90b6369 100644 --- a/t/file_open_scalar.t +++ b/t/file_open_scalar.t @@ -1,5 +1,6 @@ - -use if $] < 5.006, Test::More => skip_all => 'syntax requires perl 5.6'; +use strict; +use warnings; +use if $] < 5.006, 'Test::More' => skip_all => 'syntax requires perl 5.6'; #tests behaviour on perls 5.10? .. 5.10.1 package Some::Fake::Packege; @@ -12,7 +13,6 @@ package main; use Test::More tests => 1; use XML::Parser; -use strict; my $count = 0; diff --git a/t/memory_leak_symtab.t b/t/memory_leak_symtab.t index 3537f71..377b9d4 100644 --- a/t/memory_leak_symtab.t +++ b/t/memory_leak_symtab.t @@ -1,6 +1,7 @@ +use strict; +use warnings; use Test::More tests => 4; use XML::Parser; -use strict; # Test that parsing XML strings does not auto-vivify symbol table entries. # See https://github.com/cpan-authors/XML-Parser/issues/27 diff --git a/t/parsefile_base_restore.t b/t/parsefile_base_restore.t index ac2291e..8a1acad 100644 --- a/t/parsefile_base_restore.t +++ b/t/parsefile_base_restore.t @@ -1,3 +1,5 @@ +use strict; +use warnings; use Test::More tests => 3; use XML::Parser; diff --git a/t/position_overflow.t b/t/position_overflow.t index 59921fd..329f16c 100644 --- a/t/position_overflow.t +++ b/t/position_overflow.t @@ -1,3 +1,5 @@ +use strict; +use warnings; use Test::More tests => 9; use XML::Parser; diff --git a/t/subs_inherited.t b/t/subs_inherited.t index 055bc1a..1074033 100644 --- a/t/subs_inherited.t +++ b/t/subs_inherited.t @@ -1,3 +1,5 @@ +use strict; +use warnings; use Test::More tests => 4; use XML::Parser; diff --git a/t/tree_entity_expand.t b/t/tree_entity_expand.t index d6b61c5..92cd83a 100644 --- a/t/tree_entity_expand.t +++ b/t/tree_entity_expand.t @@ -1,3 +1,5 @@ +use strict; +use warnings; use Test::More tests => 7; use XML::Parser;