require './test.pl';
}
use strict;
+use warnings;
+no warnings 'uninitialized';
use Tie::Array;
use Tie::Hash;
my $tstr = "$left ~~ $right";
test_again:
- my $res = eval $tstr;
+ my $res;
+ if ($note =~ /NOWARNINGS/) {
+ $res = eval "no warnings; $tstr";
+ }
+ else {
+ $res = eval $tstr;
+ }
chomp $@;
! $obj @fooormore
$obj [sub{ref shift}]
-# - works with lists instead of arrays
- "foo" qw(foo bar) TODO
- "foo" ('foo','bar') TODO
-
# - a regex
= qr/x/ [qw(foo bar baz quux)]
=! qr/y/ [qw(foo bar baz quux)]
= 2 "2"
= 2 "2.0"
! 2 "2bananas"
-!= 2_3 "2_3"
+!= 2_3 "2_3" NOWARNINGS
FALSE "0"
# Regex against string
use feature 'switch';
-no warnings "numeric";
eval { continue };
like($@, qr/^Can't "continue" outside/, "continue outside");
# Code references
{
- no warnings "redefine";
my $called_foo = 0;
sub foo {$called_foo = 1; "@_" eq "foo"}
my $called_bar = 0;