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 Possible Y2K bug: %d format string following '19' Reference is already weak [Perl_sv_rvweaken] < "def" ; no warnings 'numeric' ; my $z = pack i => "def" ; EXPECT Argument "def" isn't numeric in pack at - line 3. ######## # sv.c use warnings 'numeric' ; my $a = "d\0f" ; my $x = 1 + $a ; no warnings 'numeric' ; my $z = 1 + $a ; EXPECT Argument "d\0f" isn't numeric in addition (+) at - line 4. ######## # sv.c use warnings 'redefine' ; sub fred {} sub joe {} *fred = \&joe ; no warnings 'redefine' ; sub jim {} *jim = \&joe ; EXPECT Subroutine main::fred redefined at - line 5. ######## # sv.c use 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" ; EXPECT Invalid 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.c use warnings 'misc' ; *a = undef ; no warnings 'misc' ; *b = undef ; EXPECT Undefined value assigned to typeglob at - line 3. ######## # sv.c use warnings 'y2k'; use Config; BEGIN { unless ($Config{ccflags} =~ /Y2KWARN/) { print "SKIPPED\n# perl not built with -DPERL_Y2KWARN"; exit 0; } $|=1; } my $x; my $yy = 78; $x = printf "19%02d\n", $yy; $x = sprintf "#19%02d\n", $yy; $x = printf " 19%02d\n", 78; $x = sprintf "19%02d\n", 78; $x = printf "319%02d\n", $yy; $x = sprintf "319%02d\n", $yy; no warnings 'y2k'; $x = printf "19%02d\n", $yy; $x = sprintf "19%02d\n", $yy; $x = printf "19%02d\n", 78; $x = sprintf "19%02d\n", 78; EXPECT Possible Y2K bug: %d format string following '19' at - line 16. Possible Y2K bug: %d format string following '19' at - line 13. 1978 Possible Y2K bug: %d format string following '19' at - line 14. Possible Y2K bug: %d format string following '19' at - line 15. 1978 31978 1978 1978 ######## # sv.c use warnings 'numeric' ; $a = "\x{100}\x{200}" * 42; no warnings 'numeric' ; $a = "\x{100}\x{200}" * 42; EXPECT Argument "\x{100}\x{200}" isn't numeric in multiplication (*) at - line 3. ######## # sv.c use warnings 'numeric' ; $a = "\x{100}\x{200}"; $a = -$a; no warnings 'numeric' ; $a = "\x{100}\x{200}"; $a = -$a; EXPECT Argument "\x{100}\x{200}" isn't numeric in negation (-) at - line 3. ######## # sv.c open F, ">".($^O eq 'VMS'? 'NL:' : '/dev/null') ; use warnings 'printf'; $a = "a\nb"; $s = sprintf "%4s", $a; printf F "%4s", $a; $s = sprintf "%-4s", $a; printf F "%-4s", $a; $s = sprintf "%*s", -4, $a; no warnings 'printf'; $s = sprintf "%4s", $a; printf F "%4s", $a; $s = sprintf "%-4s", $a; printf F "%-4s", $a; EXPECT Newline in left-justified string for sprintf at - line 7. Newline in left-justified string for printf at - line 8. Newline in left-justified string for sprintf at - line 9.