Commits

Toby Inkster committed a51f6a5

add "use strict"/"use warnings" to test cases

Comments (0)

Files changed (20)

 
 =cut
 
+use strict;
+use warnings;
 use Test::More tests => 1;
+
 BEGIN { use_ok('Scalar::Does') };
 
 
 =cut
 
+use strict;
+use warnings;
 use Test::More;
+
 use Scalar::Does;
 
 {
 
 =cut
 
+use strict;
+use warnings;
 use Test::More;
 use Test::Requires "Moose", "MooseX::Types::Moose";
 

t/04cleanliness.t

 
 =cut
 
+use strict;
+use warnings;
 use Test::More tests => 2;
 
 {
 
 =cut
 
+use strict;
+use warnings;
 use Test::More tests => 5;
+
 use Scalar::Does
 	custom => { -role => 'ARRAY', -as => 'does_array' },
 	custom => { -role => 'HASH',  -as => 'does_hash'  };
 =cut
 
 use strict;
+use warnings;
 use Test::More;
+
 use Scalar::Does -constants;
 
 my $var = "Hello world";
 
 =cut
 
+use strict;
+use warnings;
 use Test::More tests => 11;
+
 use Scalar::Does does => -make;
 
-my $positive = make_role 'Positive Integer', where { $_[0] > 0 };
+my $positive = make_role 'Positive Integer', where { no warnings 'numeric'; $_[0] > 0 };
 
 can_ok $positive => 'check';
 is("$positive", "Positive Integer");
 =cut
 
 use strict;
+use warnings;
 use Test::More;
+
 use Scalar::Does qw(does);
 use Scalar::Does::MooseTypes -constants;
 
 
 =cut
 
+use strict;
+use warnings;
 use Test::More;
 use Test::Requires "List::MoreUtils";
 
 
 =cut
 
+use strict;
+use warnings;
 use Test::More;
 use Test::Requires "v5.10.0";
 
 
 =cut
 
+use strict;
+use warnings;
 use Test::More;
 use Test::Requires "v5.10.1";
 
 
 =cut
 
+use strict;
+use warnings;
 use Test::More tests => 1;
+
 BEGIN { use_ok('IO::Detect') };
 

t/iod-02filehandles.t

 # http://stackoverflow.com/questions/3214647/what-is-the-best-way-to-determine-if-a-scalar-holds-a-filehandle
 #
 
+use strict;
+use warnings;
+use Test::More;
+
 use FileHandle;
 use IO::File;
 use IO::Socket::INET;
 
 use IO::Detect qw( is_filehandle FileHandle );
 
-use Test::More;
-
 plan skip_all => "only works on Linux" unless $^O =~ /linux/i;
 
 my $SLEEP = 5;

t/iod-03filenames.t

 
 =cut
 
+use strict;
+use warnings;
 use Test::More;
+
 use IO::Detect qw( is_filename FileName );
 
 my @filenames = qw(

t/iod-04fileuris.t

 
 =cut
 
+use strict;
+use warnings;
 use Test::More;
+
 use IO::Detect qw( is_fileuri FileUri );
 use URI;
 

t/iod-05ducktype.t

 
 =cut
 
+use strict;
+use warnings;
 use Test::More tests => 2;
+
 use IO::Detect ducktype => { -as => 'can_dump', methods => ['Dump'] };
 
 use Data::Dumper;
 use strict;
 use warnings;
 use Test::More;
+
 use IO::Detect as_filehandle => { mode => "<:encoding(UTF-8)" };
 
 my $fh = as_filehandle(__FILE__);
 =cut
 
 use strict;
+use warnings;
 use Test::More;
 use Test::Requires "v5.10", "IO::All";
 

t/iod-12pathclass.t

 =cut
 
 use strict;
+use warnings;
 use Test::More;
 use Test::Requires "v5.10", "Path::Class";
 

t/iod-13pathtiny.t

 =cut
 
 use strict;
+use warnings;
 use Test::More;
 use Test::Requires "v5.10", "Path::Tiny";