This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert lib/utf8.t to strict and warnings throughout.
authorNicholas Clark <nick@ccl4.org>
Tue, 21 Dec 2010 16:38:24 +0000 (16:38 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 21 Dec 2010 16:38:24 +0000 (16:38 +0000)
lib/utf8.t

index f98052c..722c51d 100644 (file)
@@ -13,6 +13,8 @@ EOF
     }
 }
 
+use strict;
+use warnings;
 no utf8; # Ironic, no?
 
 # NOTE!
@@ -111,9 +113,6 @@ plan tests => 157;
 }
 
 {
-    use warnings;
-    use strict;
-
     my $show = q(
                  sub show {
                    my $result;
@@ -459,7 +458,10 @@ SKIP: {
    ok( !utf8::is_utf8( 'asd'         ), "Wasteful format - q{}" );
    ok( !utf8::is_utf8( qw(asd)       ), "Wasteful format - qw{}" );
    ok( !utf8::is_utf8( (asd => 1)[0] ), "Wasteful format - =>" );
-   ok( !utf8::is_utf8( asd           ), "Wasteful format - bareword" );
    ok( !utf8::is_utf8( -asd          ), "Wasteful format - -word" );
+   no warnings 'bareword';
    ok( !utf8::is_utf8( asd::         ), "Wasteful format - word::" );
+   no warnings 'reserved';
+   no strict 'subs';
+   ok( !utf8::is_utf8( asd           ), "Wasteful format - bareword" );
 }