Lines Matching refs:prototype

8 # It is impossible to test every prototype that can be specified, but
26 my $p = prototype(shift);
28 my $what = defined $c ? '(' . $p . ')' : 'no prototype';
446 print "not " if defined prototype('CORE::print');
449 print "not " if defined prototype('CORE::system');
452 print "# CORE::open => ($p)\nnot " if ($p = prototype('CORE::open')) ne '*;$@';
456 if defined ($p = eval { prototype('CORE::Foo') or 1 }) or $@ !~ /^Can't find an opnumber/;
459 eval { prototype("CORE::a\0b") };
464 eval { prototype("CORE::\x{100}") };
471 if defined ($p = eval { prototype($1) or 1 })
498 # test if the (*) prototype allows barewords, constants, scalar expressions,
606 # Test that prototype binding is late
608 print "ok ", $i++, " prototype checking not done within initial definition\n";
610 print "ok ", $i++, " prototype checking done if sub pre-declared\n";
612 # test scalarref prototype
643 lazy(3, '', $i++); # allowed by prototype, even if runtime error
721 print "not " unless $warn =~ /Illegal character in prototype for main::badproto : \@bar/;
725 print "not " unless $warn =~ /Illegal character in prototype for main::badproto2 : bar/;
729 print "not " unless $warn =~ /Illegal character in prototype for main::badproto3 : &\$bar\$\@/;
734 print "not " unless $warn =~ /Illegal character in prototype for main::badproto4 : \@ \$b ar/;
737 print "ok ", $i++, " checking badproto4 - (\@ \$b ar) - prototype after '\@'\n";
740 print "not " unless $warn =~ /Illegal character after '_' in prototype for main::badproto5 : \$_\$/;
742 print "not " if $warn =~ /Illegal character in prototype for main::badproto5 : \$_\$/;
746 print "not " unless $warn =~ /Illegal character in prototype for main::badproto6 : bar_/;
748 print "not " if $warn =~ /Illegal character after '_' in prototype for main::badproto6 : bar_/;
752 print "not " unless $warn =~ /Illegal character in prototype for main::badproto7 : _;bar/;
754 print "not " if $warn =~ /Illegal character after '_' in prototype for main::badproto7 : _;bar/;
758 print "not " unless $warn =~ /Illegal character after '_' in prototype for main::badproto8 : _b/;
760 print "not " unless $warn =~ /Illegal character in prototype for main::badproto8 : _b/;
764 print "not " unless $warn =~ /Missing '\]' in prototype for main::badproto9 : \[/;
768 print "not " if $warn =~ /Missing '\]' in prototype for main::badproto10 : \[/;
770 print "not " unless $warn =~ /Illegal character after '_' in prototype for main::badproto10 : \[_\]/;
851 # Lack of prototype on a subroutine definition should override any prototype
890 # [perl #123514] prototype with no arguments
892 @_ = (1, 2, 3, prototype(), 4, 5, 6);