sv

来自「source of perl for linux application,」· 代码 · 共 332 行

TXT
332
字号
  sv.c	  warn(warn_uninit);  warn(warn_uninit);  warn(warn_uninit);  warn(warn_uninit);  not_a_number(sv);  not_a_number(sv);  warn(warn_uninit);  not_a_number(sv);  warn(warn_uninit);  not_a_number(sv);  not_a_number(sv);  warn(warn_uninit);  warn(warn_uninit);  Subroutine %s redefined	  Invalid conversion in %s:  Undefined value assigned to typeglob  Reference is already weak			[Perl_sv_rvweaken] <<TODO  Mandatory Warnings  ------------------  Malformed UTF-8 character [sv_pos_b2u] (not tested: difficult to produce                                          with perl now)  Mandatory Warnings TODO  ------------------    Attempt to free non-arena SV: 0x%lx		[del_sv]    Reference miscount in sv_replace()		[sv_replace]    Attempt to free unreferenced scalar		[sv_free]    Attempt to free temp prematurely: SV 0x%lx	[sv_free]    semi-panic: attempt to dup freed string	[newSVsv]    __END__# sv.cuse integer ;use warnings 'uninitialized' ;$x = 1 + $a[0] ; # ano warnings 'uninitialized' ;$x = 1 + $b[0] ; # aEXPECTUse of uninitialized value $a[0] in integer addition (+) at - line 4.######### sv.c (sv_2iv)package fred ;sub TIESCALAR { my $x ; bless \$x}sub FETCH { return undef }sub STORE { return 1 }package main ;tie $A, 'fred' ;use integer ;use warnings 'uninitialized' ;$A *= 2 ;no warnings 'uninitialized' ;$A *= 2 ;EXPECTUse of uninitialized value $A in integer multiplication (*) at - line 10.######### sv.cuse integer ;use warnings 'uninitialized' ;my $x *= 2 ; #b no warnings 'uninitialized' ;my $y *= 2 ; #b EXPECTUse of uninitialized value $x in integer multiplication (*) at - line 4.######### sv.c (sv_2uv)package fred ;sub TIESCALAR { my $x ; bless \$x}sub FETCH { return undef }sub STORE { return 1 }package main ;tie $A, 'fred' ;use warnings 'uninitialized' ;$B = 0 ;$B |= $A ;no warnings 'uninitialized' ;$B = 0 ;$B |= $A ;EXPECTUse of uninitialized value $A in bitwise or (|) at - line 10.######### sv.cuse warnings 'uninitialized' ;my $Y = 1 ; my $x = 1 | $a[$Y] ;no warnings 'uninitialized' ;my $Y = 1 ; $x = 1 | $b[$Y] ;EXPECTUse of uninitialized value within @a in bitwise or (|) at - line 4.######### sv.cuse warnings 'uninitialized' ;my $Y = 1 ; my $x = 1 & $a[$Y] ;no warnings 'uninitialized' ;my $Y = 1 ; $x = 1 & $b[$Y] ;EXPECTUse of uninitialized value within @a in bitwise and (&) at - line 4.######### sv.cuse warnings 'uninitialized' ;my $Y = 1 ; my $x = ~$a[$Y] ;no warnings 'uninitialized' ;my $Y = 1 ; $x = ~$b[$Y] ;EXPECTUse of uninitialized value within @a in 1's complement (~) at - line 4.######### sv.cuse warnings 'uninitialized' ;my $x *= 1 ; # dno warnings 'uninitialized' ;my $y *= 1 ; # dEXPECTUse of uninitialized value $x in multiplication (*) at - line 3.######### sv.cuse warnings 'uninitialized' ;$x = 1 + $a[0] ; # eno warnings 'uninitialized' ;$x = 1 + $b[0] ; # eEXPECTUse of uninitialized value $a[0] in addition (+) at - line 3.######### sv.c (sv_2nv)package fred ;sub TIESCALAR { my $x ; bless \$x}sub FETCH { return undef }sub STORE { return 1 }package main ;tie $A, 'fred' ;use warnings 'uninitialized' ;$A *= 2 ;no warnings 'uninitialized' ;$A *= 2 ;EXPECTUse of uninitialized value $A in multiplication (*) at - line 9.######### sv.cuse warnings 'uninitialized' ;$x = $y + 1 ; # fno warnings 'uninitialized' ;$x = $z + 1 ; # fEXPECTUse of uninitialized value $y in addition (+) at - line 3.######### sv.cuse warnings 'uninitialized' ;$x = chop undef ; # gno warnings 'uninitialized' ;$x = chop undef ; # gEXPECTModification of a read-only value attempted at - line 3.######### sv.cuse warnings 'uninitialized' ;$x = chop $y ; # hno warnings 'uninitialized' ;$x = chop $z ; # hEXPECTUse of uninitialized value $y in scalar chop at - line 3.######### sv.c (sv_2pv)package fred ;sub TIESCALAR { my $x ; bless \$x}sub FETCH { return undef }sub STORE { return 1 }package main ;tie $A, 'fred' ;use warnings 'uninitialized' ;$B = "" ;$B .= $A ;no warnings 'uninitialized' ;$C = "" ;$C .= $A ;EXPECTUse of uninitialized value $A in concatenation (.) or string at - line 10.######### perlbug 20011116.125use warnings 'uninitialized';$a = undef;$foo = join '', $a, "\n";$foo = "$a\n";$foo = "a:$a\n";EXPECTUse of uninitialized value $a in join or string at - line 4.Use of uninitialized value $a in concatenation (.) or string at - line 5.Use of uninitialized value $a in concatenation (.) or string at - line 6.######### sv.c use warnings 'numeric' ;sub TIESCALAR{bless[]} ; sub FETCH {"def"} ; tie $a,"main" ; my $b = 1 + $a;no warnings 'numeric' ;my $c = 1 + $a;EXPECTArgument "def" isn't numeric in addition (+) at - line 6.######### sv.cuse warnings 'numeric' ;my $x = 1 + "def" ;no warnings 'numeric' ;my $z = 1 + "def" ;EXPECTArgument "def" isn't numeric in addition (+) at - line 3.######### sv.cuse warnings 'numeric' ;my $a = "def" ;my $x = 1 + $a ;no warnings 'numeric' ;my $y = 1 + $a ;EXPECTArgument "def" isn't numeric in addition (+) at - line 4.######### sv.cuse warnings 'numeric' ; use integer ;my $a = "def" ;my $x = 1 + $a ;no warnings 'numeric' ;my $z = 1 + $a ;EXPECTArgument "def" isn't numeric in integer addition (+) at - line 4.######### sv.cuse warnings 'numeric' ;my $x = 1 & "def" ;no warnings 'numeric' ;my $z = 1 & "def" ;EXPECTArgument "def" isn't numeric in bitwise and (&) at - line 3.######### sv.cuse warnings 'numeric' ;my $x = pack i => "def" ;no warnings 'numeric' ;my $z = pack i => "def" ;EXPECTArgument "def" isn't numeric in pack at - line 3.######### sv.cuse warnings 'numeric' ; my $a = "d\0f" ;my $x = 1 + $a ;no warnings 'numeric' ;my $z = 1 + $a ;EXPECTArgument "d\0f" isn't numeric in addition (+) at - line 4.######### sv.cuse warnings 'redefine' ;sub fred {}  sub joe {} *fred = \&joe ;no warnings 'redefine' ;sub jim {} *jim = \&joe ;EXPECTSubroutine main::fred redefined at - line 5.######### sv.cuse warnings 'printf' ;open F, ">".($^O eq 'VMS'? 'NL:' : '/dev/null') ;printf F "%z\n" ;my $a = sprintf "%z" ;printf F "%" ;$a = sprintf "%" ;printf F "%\x02" ;$a = sprintf "%\x02" ;no warnings 'printf' ;printf F "%z\n" ;$a = sprintf "%z" ;printf F "%" ;$a = sprintf "%" ;printf F "%\x02" ;$a = sprintf "%\x02" ;EXPECTInvalid conversion in printf: "%z" at - line 4.Invalid conversion in sprintf: "%z" at - line 5.Invalid conversion in printf: end of string at - line 6.Invalid conversion in sprintf: end of string at - line 7.Invalid conversion in printf: "%\002" at - line 8.Invalid conversion in sprintf: "%\002" at - line 9.######### sv.cuse warnings 'misc' ;*a = undef ;no warnings 'misc' ;*b = undef ;EXPECTUndefined value assigned to typeglob at - line 3.######### sv.cuse warnings 'numeric' ;$a = "\x{100}\x{200}" * 42;no warnings 'numeric' ;$a = "\x{100}\x{200}" * 42;EXPECTArgument "\x{100}\x{200}" isn't numeric in multiplication (*) at - line 3.######### sv.cuse warnings 'numeric' ;$a = "\x{100}\x{200}"; $a = -$a;no warnings 'numeric' ;$a = "\x{100}\x{200}"; $a = -$a;EXPECTArgument "\x{100}\x{200}" isn't numeric in negation (-) at - line 3.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?