Temporary workaround.
[p5sagit/p5-mst-13.2.git] / t / lib / warnings / pp
CommitLineData
599cee73 1 pp.c TODO
2
3 substr outside of string
e476b1b5 4 $a = "ab" ; $b = substr($a, 4,5) ;
599cee73 5
6 Attempt to use reference as lvalue in substr
7 $a = "ab" ; $b = \$a ; substr($b, 1,1) = $b
8
9 uninitialized in pp_rv2gv()
10 my *b = *{ undef()}
11
12 uninitialized in pp_rv2sv()
13 my $a = undef ; my $b = $$a
14
15 Odd number of elements in hash list
16 my $a = { 1,2,3 } ;
17
599cee73 18 Explicit blessing to '' (assuming package main)
19 bless \[], "";
20
0453d815 21 Constant subroutine %s undefined <<<TODO
22 Constant subroutine (anonymous) undefined <<<TODO
23
599cee73 24__END__
25# pp.c
4438c4b7 26use warnings 'substr' ;
599cee73 27$a = "ab" ;
e476b1b5 28$b = substr($a, 4,5) ;
4438c4b7 29no warnings 'substr' ;
0453d815 30$a = "ab" ;
e476b1b5 31$b = substr($a, 4,5) ;
599cee73 32EXPECT
33substr outside of string at - line 4.
34########
35# pp.c
4438c4b7 36use warnings 'substr' ;
599cee73 37$a = "ab" ;
38$b = \$a ;
39substr($b, 1,1) = "ab" ;
4438c4b7 40no warnings 'substr' ;
0453d815 41substr($b, 1,1) = "ab" ;
599cee73 42EXPECT
43Attempt to use reference as lvalue in substr at - line 5.
44########
45# pp.c
4438c4b7 46use warnings 'uninitialized' ;
599cee73 47# TODO
48EXPECT
49
50########
51# pp.c
e476b1b5 52use warnings 'misc' ;
599cee73 53my $a = { 1,2,3};
e476b1b5 54no warnings 'misc' ;
0453d815 55my $b = { 1,2,3};
599cee73 56EXPECT
57Odd number of elements in hash assignment at - line 3.
58########
599cee73 59# pp.c
e476b1b5 60use warnings 'misc' ;
599cee73 61bless \[], "" ;
e476b1b5 62no warnings 'misc' ;
0453d815 63bless \[], "" ;
599cee73 64EXPECT
65Explicit blessing to '' (assuming package main) at - line 3.
0453d815 66########
67# pp.c
68use utf8 ;
69$_ = "\x80 \xff" ;
70reverse ;
71EXPECT