summaryrefslogtreecommitdiff
path: root/t/lib/warnings/gv
blob: 1618e40932251f3d28a3ad7a5a42f6ceb438b244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
  gv.c AOK

     Can't locate package %s for @%s::ISA
	@ISA = qw(Fred); joe()

     Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated
	sub Other::AUTOLOAD { 1 } sub Other::fred {}
	@ISA = qw(Other) ;
	fred() ;

     $# is no longer supported
     $* is no longer supported

	$a = ${"#"} ;
 	$a = ${"*"} ;

  Mandatory Warnings ALL TODO
  ------------------

    Had to create %SVf unexpectedly		[gv_fetchpv]
    Attempt to free unreferenced glob pointers	[gp_free]
    
__END__
# gv.c
use warnings 'syntax' ;
@ISA = qw(Fred); joe()
EXPECT
Can't locate package Fred for @main::ISA at - line 3.
Undefined subroutine &main::joe called at - line 3.
########
# gv.c
no warnings 'syntax' ;
@ISA = qw(Fred); joe()
EXPECT
Undefined subroutine &main::joe called at - line 3.
########
# gv.c
sub Other::AUTOLOAD { 1 } sub Other::fred {}
@ISA = qw(Other) ;
use warnings 'deprecated' ;
fred() ;
EXPECT
Use of inherited AUTOLOAD for non-method main::fred() is deprecated at - line 5.
########
# gv.c
use utf8;
use open qw( :utf8 :std );
sub Oᕞʀ::AUTOLOAD { 1 } sub Oᕞʀ::fᕃƌ {}
@ISA = qw(Oᕞʀ) ;
use warnings 'deprecated' ;
fᕃƌ() ;
EXPECT
Use of inherited AUTOLOAD for non-method main::fᕃƌ() is deprecated at - line 7.
########
# gv.c
$a = ${"#"};
$a = ${"*"};
no warnings 'deprecated' ;
$a = ${"#"};
$a = ${"*"};
EXPECT
$# is no longer supported at - line 2.
$* is no longer supported, and will become a syntax error at - line 3.
########
# gv.c
$a = ${#};
$a = ${*};
no warnings 'deprecated' ;
$a = ${#};
$a = ${*};
EXPECT
$# is no longer supported at - line 2.
$* is no longer supported, and will become a syntax error at - line 3.
########
# gv.c
$a = $#;
$a = $*;
$# = $a;
$* = $a;
$a = \$#;
$a = \$*;
no warnings 'deprecated' ;
$a = $#;
$a = $*;
$# = $a;
$* = $a;
$a = \$#;
$a = \$*;
EXPECT
$# is no longer supported at - line 2.
$* is no longer supported, and will become a syntax error at - line 3.
$# is no longer supported at - line 4.
$* is no longer supported, and will become a syntax error at - line 5.
$# is no longer supported at - line 6.
$* is no longer supported, and will become a syntax error at - line 7.
########
# gv.c
@a = @#;
@a = @*;
$a = $#;
$a = $*;
EXPECT
$# is no longer supported at - line 4.
$* is no longer supported, and will become a syntax error at - line 5.
########
# gv.c
$a = $#;
$a = $*;
@a = @#;
@a = @*;
EXPECT
$# is no longer supported at - line 2.
$* is no longer supported, and will become a syntax error at - line 3.
########
# gv.c
use warnings 'syntax' ;
use utf8;
use open qw( :utf8 :std );
package Y;
@ISA = qw(Fred); joe()
EXPECT
Can't locate package Fred for @Y::ISA at - line 6.
Undefined subroutine &Y::joe called at - line 6.