Check interaction of $^W and lexical

__END__

# Check interaction of $^W and use warning
sub fred { 
    use warning ;
    my $b ; 
    chop $b ;
}
{ local $^W = 0 ;
  fred() ;
}

EXPECT
Use of uninitialized value at - line 6.
########

# Check interaction of $^W and use warning
sub fred { 
    use warning ;
    my $b ; 
    chop $b ;
}
{ $^W = 0 ;
  fred() ;
}

EXPECT
Use of uninitialized value at - line 6.
########

# Check interaction of $^W and use warning
sub fred { 
    no warning ;
    my $b ; 
    chop $b ;
}
{ local $^W = 1 ;
  fred() ;
}

EXPECT

########

# Check interaction of $^W and use warning
sub fred { 
    no warning ;
    my $b ; 
    chop $b ;
}
{ $^W = 1 ;
  fred() ;
}

EXPECT

########

# Check interaction of $^W and use warning
use warning ;
$^W = 1 ;
my $b ; 
chop $b ;
EXPECT
Use of uninitialized value at - line 6.
########

# Check interaction of $^W and use warning
$^W = 1 ;
use warning ;
my $b ; 
chop $b ;
EXPECT
Use of uninitialized value at - line 6.
########

# Check interaction of $^W and use warning
$^W = 1 ;
no warning ;
my $b ; 
chop $b ;
EXPECT

########

# Check interaction of $^W and use warning
no warning ;
$^W = 1 ;
my $b ; 
chop $b ;
EXPECT

########
-w
# Check interaction of $^W and use warning
no warning ;
my $b ; 
chop $b ;
EXPECT

########
-w
# Check interaction of $^W and use warning
use warning ;
my $b ; 
chop $b ;
EXPECT
Use of uninitialized value at - line 5.
########

# Check interaction of $^W and use warning
sub fred { 
    use warning ;
    my $b ; 
    chop $b ;
}
BEGIN {  $^W = 0 }
fred() ;
EXPECT
Use of uninitialized value at - line 6.
########

# Check interaction of $^W and use warning
sub fred { 
    no warning ;
    my $b ; 
    chop $b ;
}
BEGIN {  $^W = 1 }
fred() ;

EXPECT

########

# Check interaction of $^W and use warning
use warning ;
BEGIN {  $^W = 1 }
my $b ; 
chop $b ;
EXPECT
Use of uninitialized value at - line 6.
########

# Check interaction of $^W and use warning
BEGIN {  $^W = 1 }
use warning ;
my $b ; 
chop $b ;
EXPECT
Use of uninitialized value at - line 6.
########

# Check interaction of $^W and use warning
BEGIN {  $^W = 1 }
no warning ;
my $b ; 
chop $b ;
EXPECT

########

# Check interaction of $^W and use warning
no warning ;
BEGIN {  $^W = 1 }
my $b ; 
chop $b ;
EXPECT

########

# Check interaction of $^W and use warning
BEGIN {  $^W = 1 }
{
    no warning ;
    my $b ; 
    chop $b ;
}
my $b ;
chop $b ;
EXPECT
Use of uninitialized value at - line 10.
########

# Check interaction of $^W and use warning
BEGIN {  $^W = 0 }
{
    use warning ;
    my $b ; 
    chop $b ;
}
my $b ;
chop $b ;
EXPECT
Use of uninitialized value at - line 7.
