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 lexical warnings functionality

TODO
  check that the warning hierarchy works.

__END__

#  check illegal category is caught
use warnings 'this-should-never-be-a-warning-category' ;
EXPECT
unknown warnings category 'this-should-never-be-a-warning-category' at - line 3
BEGIN failed--compilation aborted at - line 3.
########

# Check compile time scope of pragma
use warnings 'deprecated' ;
{
    no warnings ;
    1 if $a EQ $b ;
}
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 8.
########

# Check compile time scope of pragma
no warnings;
{
    use warnings 'deprecated' ;
    1 if $a EQ $b ;
}
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 6.
########

# Check runtime scope of pragma
use warnings 'uninitialized' ;
{
    no warnings ;
    my $b ; chop $b ;
}
my $b ; chop $b ;
EXPECT
Use of uninitialized value in scalar chop at - line 8.
########

# Check runtime scope of pragma
no warnings ;
{
    use warnings 'uninitialized' ;
    my $b ; chop $b ;
}
my $b ; chop $b ;
EXPECT
Use of uninitialized value in scalar chop at - line 6.
########

# Check runtime scope of pragma
no warnings ;
{
    use warnings 'uninitialized' ;
    $a = sub { my $b ; chop $b ; }
}
&$a ;
EXPECT
Use of uninitialized value in scalar chop at - line 6.
########

use warnings 'deprecated' ;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 3.
########

--FILE-- abc
1 if $a EQ $b ;
1;
--FILE-- 
use warnings 'deprecated' ;
require "./abc";
EXPECT

########

--FILE-- abc
use warnings 'deprecated' ;
1;
--FILE-- 
require "./abc";
1 if $a EQ $b ;
EXPECT

########

--FILE-- abc
use warnings 'deprecated' ;
1 if $a EQ $b ;
1;
--FILE-- 
use warnings 'uninitialized' ;
require "./abc";
my $a ; chop $a ;
EXPECT
Use of EQ is deprecated at ./abc line 2.
Use of uninitialized value in scalar chop at - line 3.
########

--FILE-- abc.pm
use warnings 'deprecated' ;
1 if $a EQ $b ;
1;
--FILE-- 
use warnings 'uninitialized' ;
use abc;
my $a ; chop $a ;
EXPECT
Use of EQ is deprecated at abc.pm line 2.
Use of uninitialized value in scalar chop at - line 3.
########

# Check scope of pragma with eval
no warnings ;
eval {
    my $b ; chop $b ;
}; print STDERR $@@ ;
my $b ; chop $b ;
EXPECT

########

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

# Check scope of pragma with eval
use warnings 'uninitialized' ;
eval {
    my $b ; chop $b ;
}; print STDERR $@@ ;
my $b ; chop $b ;
EXPECT
Use of uninitialized value in scalar chop at - line 5.
Use of uninitialized value in scalar chop at - line 7.
########

# Check scope of pragma with eval
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 8.
########

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

########

# Check scope of pragma with eval
no warnings ;
eval {
    use warnings 'deprecated' ;
    1 if $a EQ $b ;
}; print STDERR $@@ ;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 6.
########

# Check scope of pragma with eval
use warnings 'deprecated' ;
eval {
    1 if $a EQ $b ;
}; print STDERR $@@ ;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 5.
Use of EQ is deprecated at - line 7.
########

# Check scope of pragma with eval
use warnings 'deprecated' ;
eval {
    no warnings ;
    1 if $a EQ $b ;
}; print STDERR $@@ ;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 8.
########

# Check scope of pragma with eval
no warnings ;
eval '
    my $b ; chop $b ;
'; print STDERR $@@ ;
my $b ; chop $b ;
EXPECT

########

# Check scope of pragma with eval
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
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 7.
########

# Check scope of pragma with eval
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 8.
########

# Check scope of pragma with eval
no warnings ;
eval '
    1 if $a EQ $b ;
'; print STDERR $@@ ;
1 if $a EQ $b ;
EXPECT

########

# Check scope of pragma with eval
no warnings ;
eval q[ 
    use warnings 'deprecated' ;
    1 if $a EQ $b ;
]; print STDERR $@@;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at (eval 1) line 3.
########

# Check scope of pragma with eval
use warnings 'deprecated' ;
eval '
    1 if $a EQ $b ;
'; print STDERR $@@;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 7.
Use of EQ is deprecated at (eval 1) line 2.
########

# Check scope of pragma with eval
use warnings 'deprecated' ;
eval '
    no warnings ;
    1 if $a EQ $b ;
'; print STDERR $@@;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 8.
########

# Check the additive nature of the pragma
1 if $a EQ $b ;
my $a ; chop $a ;
use warnings 'deprecated' ;
1 if $a EQ $b ;
my $b ; chop $b ;
use warnings 'uninitialized' ;
my $c ; chop $c ;
no warnings 'deprecated' ;
1 if $a EQ $b ;
EXPECT
Use of EQ is deprecated at - line 6.
Use of uninitialized value in scalar chop at - line 9.
Use of uninitialized value in string eq at - line 11.
Use of uninitialized value in string eq at - line 11.
@


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
@d123 2
a124 6
use warnings;
{
    no warnings ;
    eval {
        my $b ; chop $b ;
    }; print STDERR $@@ ;
d126 2
a127 1
}
d133 3
a135 7
use warnings;
{
    no warnings ;
    eval {
        use warnings 'uninitialized' ;
        my $b ; chop $b ;
    }; print STDERR $@@ ;
d137 2
a138 1
}
d140 1
a140 1
Use of uninitialized value in scalar chop at - line 8.
d144 2
a145 6
no warnings;
{
    use warnings 'uninitialized' ;
    eval {
        my $b ; chop $b ;
    }; print STDERR $@@ ;
d147 2
a148 1
}
d150 1
a151 1
Use of uninitialized value in scalar chop at - line 9.
d155 3
a157 7
no warnings;
{
    use warnings 'uninitialized' ;
    eval {
        no warnings ;
        my $b ; chop $b ;
    }; print STDERR $@@ ;
d159 2
a160 1
}
d162 1
a162 1
Use of uninitialized value in scalar chop at - line 10.
d166 2
a167 6
use warnings;
{
    no warnings ;
    eval {
        1 if $a EQ $b ;
    }; print STDERR $@@ ;
d169 2
a170 1
}
d176 3
a178 7
use warnings;
{
    no warnings ;
    eval {
        use warnings 'deprecated' ;
        1 if $a EQ $b ;
    }; print STDERR $@@ ;
d180 2
a181 1
}
d183 1
a183 1
Use of EQ is deprecated at - line 8.
d187 2
a188 6
no warnings;
{
    use warnings 'deprecated' ;
    eval {
        1 if $a EQ $b ;
    }; print STDERR $@@ ;
d190 2
a191 1
}
d193 1
a194 1
Use of EQ is deprecated at - line 9.
d198 3
a200 7
no warnings;
{
    use warnings 'deprecated' ;
    eval {
        no warnings ;
        1 if $a EQ $b ;
    }; print STDERR $@@ ;
d202 2
a203 1
}
d205 1
a205 1
Use of EQ is deprecated at - line 10.
d209 2
a210 6
use warnings;
{
    no warnings ;
    eval '
        my $b ; chop $b ;
    '; print STDERR $@@ ;
d212 2
a213 1
}
d219 3
a221 7
use warnings;
{
    no warnings ;
    eval q[ 
        use warnings 'uninitialized' ;
        my $b ; chop $b ;
    ]; print STDERR $@@;
d223 2
a224 1
}
d230 2
a231 6
no warnings;
{
    use warnings 'uninitialized' ;
    eval '
        my $b ; chop $b ;
    '; print STDERR $@@ ;
d233 2
a234 1
}
d237 1
a237 1
Use of uninitialized value in scalar chop at - line 9.
d241 3
a243 7
no warnings;
{
    use warnings 'uninitialized' ;
    eval '
        no warnings ;
        my $b ; chop $b ;
    '; print STDERR $@@ ;
d245 2
a246 1
}
d248 1
a248 1
Use of uninitialized value in scalar chop at - line 10.
d252 2
a253 6
use warnings;
{
    no warnings ;
    eval '
        1 if $a EQ $b ;
    '; print STDERR $@@ ;
d255 2
a256 1
}
d262 3
a264 7
use warnings;
{
    no warnings ;
    eval q[ 
        use warnings 'deprecated' ;
        1 if $a EQ $b ;
    ]; print STDERR $@@;
d266 2
a267 1
}
d273 2
a274 6
no warnings;
{
    use warnings 'deprecated' ;
    eval '
        1 if $a EQ $b ;
    '; print STDERR $@@;
d276 2
a277 1
}
d279 1
a279 1
Use of EQ is deprecated at - line 9.
d284 3
a286 7
no warnings;
{
    use warnings 'deprecated' ;
    eval '
        no warnings ;
        1 if $a EQ $b ;
    '; print STDERR $@@;
d288 2
a289 1
}
d291 1
a291 1
Use of EQ is deprecated at - line 10.
@

