head	1.2;
access;
symbols
	v5_006_01:1.1.1.2
	PRE_SMPNG:1.1.1.1
	v5_006:1.1.1.1
	LWALL:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2002.05.16.10.09.26;	author markm;	state dead;
branches;
next	1.1;

1.1
date	2000.06.25.11.03.57;	author markm;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.06.25.11.03.57;	author markm;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2002.03.16.20.14.29;	author markm;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Perl is no longer in base. Long live the port!
@
text
@Check interaction of $^W and lexical

__END__

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

EXPECT
Use of uninitialized value in scalar chop at - line 6.
########

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

EXPECT
Use of uninitialized value in scalar chop at - line 6.
########

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

EXPECT

########

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

EXPECT

########

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

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

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

########

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

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

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

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

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

EXPECT

########

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

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

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

########

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

########

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

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


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Vendor import of Perl 5.006
@
text
@@


1.1.1.2
log
@Vendor import Perl 5.6.1
@
text
@a197 69
########

# Check scope of pragma with eval
BEGIN {  $^W = 1 }
{
    no warnings ;
    eval '
        my $b ; chop $b ;
    '; print STDERR $@@ ;
    my $b ; chop $b ;
}
EXPECT

########

# Check scope of pragma with eval
BEGIN {  $^W = 1 }
use warnings;
{
    no warnings ;
    eval q[ 
        use warnings 'uninitialized' ;
        my $b ; chop $b ;
    ]; print STDERR $@@;
    my $b ; chop $b ;
}
EXPECT
Use of uninitialized value in scalar chop at (eval 1) line 3.
########

# Check scope of pragma with eval
BEGIN {  $^W = 0 }
{
    use warnings 'uninitialized' ;
    eval '
        my $b ; chop $b ;
    '; print STDERR $@@ ;
    my $b ; chop $b ;
}
EXPECT
Use of uninitialized value in scalar chop at (eval 1) line 2.
Use of uninitialized value in scalar chop at - line 9.
########

# Check scope of pragma with eval
BEGIN {  $^W = 0 }
{
    use warnings 'uninitialized' ;
    eval '
        no warnings ;
        my $b ; chop $b ;
    '; print STDERR $@@ ;
    my $b ; chop $b ;
}
EXPECT
Use of uninitialized value in scalar chop at - line 10.
########

# Check scope of pragma with eval
BEGIN {  $^W = 1 }
{
    no warnings ;
    eval '
        1 if $a EQ $b ;
    '; print STDERR $@@ ;
    1 if $a EQ $b ;
}
EXPECT

@

