home *** CD-ROM | disk | FTP | other *** search
/ CLIX - Fazer Clix Custa Nix / CLIX-CD.cdr / mac / lib / diagnostics.pm < prev    next >
Text File  |  1998-04-04  |  113KB  |  3,399 lines

  1. package diagnostics;
  2.  
  3. =head1 NAME
  4.  
  5. diagnostics - Perl compiler pragma to force verbose warning diagnostics
  6.  
  7. splain - standalone program to do the same thing
  8.  
  9. =head1 SYNOPSIS
  10.  
  11. As a pragma:
  12.  
  13.     use diagnostics;
  14.     use diagnostics -verbose;
  15.  
  16.     enable  diagnostics;
  17.     disable diagnostics;
  18.  
  19. Aa a program:
  20.  
  21.     perl program 2>diag.out
  22.     splain [-v] [-p] diag.out
  23.  
  24.  
  25. =head1 DESCRIPTION
  26.  
  27. =head2 The C<diagnostics> Pragma
  28.  
  29. This module extends the terse diagnostics normally emitted by both the
  30. perl compiler and the perl interpeter, augmenting them with the more
  31. explicative and endearing descriptions found in L<perldiag>.  Like the
  32. other pragmata, it affects the compilation phase of your program rather
  33. than merely the execution phase.
  34.  
  35. To use in your program as a pragma, merely invoke
  36.  
  37.     use diagnostics;
  38.  
  39. at the start (or near the start) of your program.  (Note 
  40. that this I<does> enable perl's B<-w> flag.)  Your whole
  41. compilation will then be subject(ed :-) to the enhanced diagnostics.
  42. These still go out B<STDERR>.
  43.  
  44. Due to the interaction between runtime and compiletime issues,
  45. and because it's probably not a very good idea anyway,
  46. you may not use C<no diagnostics> to turn them off at compiletime.
  47. However, you may control there behaviour at runtime using the 
  48. disable() and enable() methods to turn them off and on respectively.
  49.  
  50. The B<-verbose> flag first prints out the L<perldiag> introduction before
  51. any other diagnostics.  The $diagnostics::PRETTY variable can generate nicer
  52. escape sequences for pagers.
  53.  
  54. =head2 The I<splain> Program
  55.  
  56. While apparently a whole nuther program, I<splain> is actually nothing
  57. more than a link to the (executable) F<diagnostics.pm> module, as well as
  58. a link to the F<diagnostics.pod> documentation.  The B<-v> flag is like
  59. the C<use diagnostics -verbose> directive.
  60. The B<-p> flag is like the
  61. $diagnostics::PRETTY variable.  Since you're post-processing with 
  62. I<splain>, there's no sense in being able to enable() or disable() processing.
  63.  
  64. Output from I<splain> is directed to B<STDOUT>, unlike the pragma.
  65.  
  66. =head1 EXAMPLES
  67.  
  68. The following file is certain to trigger a few errors at both
  69. runtime and compiletime:
  70.  
  71.     use diagnostics;
  72.     print NOWHERE "nothing\n";
  73.     print STDERR "\n\tThis message should be unadorned.\n";
  74.     warn "\tThis is a user warning";
  75.     print "\nDIAGNOSTIC TESTER: Please enter a <CR> here: ";
  76.     my $a, $b = scalar <STDIN>;
  77.     print "\n";
  78.     print $x/$y;
  79.  
  80. If you prefer to run your program first and look at its problem
  81. afterwards, do this:
  82.  
  83.     perl -w test.pl 2>test.out
  84.     ./splain < test.out
  85.  
  86. Note that this is not in general possible in shells of more dubious heritage, 
  87. as the theoretical 
  88.  
  89.     (perl -w test.pl >/dev/tty) >& test.out
  90.     ./splain < test.out
  91.  
  92. Because you just moved the existing B<stdout> to somewhere else.
  93.  
  94. If you don't want to modify your source code, but still have on-the-fly
  95. warnings, do this:
  96.  
  97.     exec 3>&1; perl -w test.pl 2>&1 1>&3 3>&- | splain 1>&2 3>&- 
  98.  
  99. Nifty, eh?
  100.  
  101. If you want to control warnings on the fly, do something like this.
  102. Make sure you do the C<use> first, or you won't be able to get
  103. at the enable() or disable() methods.
  104.  
  105.     use diagnostics; # checks entire compilation phase 
  106.     print "\ntime for 1st bogus diags: SQUAWKINGS\n";
  107.     print BOGUS1 'nada';
  108.     print "done with 1st bogus\n";
  109.  
  110.     disable diagnostics; # only turns off runtime warnings
  111.     print "\ntime for 2nd bogus: (squelched)\n";
  112.     print BOGUS2 'nada';
  113.     print "done with 2nd bogus\n";
  114.  
  115.     enable diagnostics; # turns back on runtime warnings
  116.     print "\ntime for 3rd bogus: SQUAWKINGS\n";
  117.     print BOGUS3 'nada';
  118.     print "done with 3rd bogus\n";
  119.  
  120.     disable diagnostics;
  121.     print "\ntime for 4th bogus: (squelched)\n";
  122.     print BOGUS4 'nada';
  123.     print "done with 4th bogus\n";
  124.  
  125. =head1 INTERNALS
  126.  
  127. Diagnostic messages derive from the F<perldiag.pod> file when available at
  128. runtime.  Otherwise, they may be embedded in the file itself when the
  129. splain package is built.   See the F<Makefile> for details.
  130.  
  131. If an extant $SIG{__WARN__} handler is discovered, it will continue
  132. to be honored, but only after the diagnostics::splainthis() function 
  133. (the module's $SIG{__WARN__} interceptor) has had its way with your
  134. warnings.
  135.  
  136. There is a $diagnostics::DEBUG variable you may set if you're desperately
  137. curious what sorts of things are being intercepted.
  138.  
  139.     BEGIN { $diagnostics::DEBUG = 1 } 
  140.  
  141.  
  142. =head1 BUGS
  143.  
  144. Not being able to say "no diagnostics" is annoying, but may not be
  145. insurmountable.
  146.  
  147. The C<-pretty> directive is called too late to affect matters.
  148. You have to do this instead, and I<before> you load the module.
  149.  
  150.     BEGIN { $diagnostics::PRETTY = 1 } 
  151.  
  152. I could start up faster by delaying compilation until it should be
  153. needed, but this gets a "panic: top_level" when using the pragma form
  154. in Perl 5.001e.
  155.  
  156. While it's true that this documentation is somewhat subserious, if you use
  157. a program named I<splain>, you should expect a bit of whimsy.
  158.  
  159. =head1 AUTHOR
  160.  
  161. Tom Christiansen <F<tchrist@mox.perl.com>>, 25 June 1995.
  162.  
  163. =cut
  164.  
  165. require 5.001;
  166. use Carp;
  167.  
  168. use Config;
  169. ($privlib, $archlib) = @Config{qw(privlibexp archlibexp)};
  170. if ($^O eq 'VMS') {
  171.     require VMS::Filespec;
  172.     $privlib = VMS::Filespec::unixify($privlib);
  173.     $archlib = VMS::Filespec::unixify($archlib);
  174. }
  175. @trypod = ("$archlib/pod/perldiag.pod",
  176.        "$privlib/pod/perldiag-$].pod",
  177.        "$privlib/pod/perldiag.pod");
  178. ($PODFILE) = ((grep { -e } @trypod), $trypod[$#trypod])[0];
  179.  
  180. $DEBUG ||= 0;
  181. my $WHOAMI = ref bless [];  # nobody's business, prolly not even mine
  182.  
  183. $| = 1;
  184.  
  185. local $_;
  186.  
  187. CONFIG: {
  188.     $opt_p = $opt_d = $opt_v = $opt_f = '';
  189.     %HTML_2_Troff = %HTML_2_Latin_1 = %HTML_2_ASCII_7 = ();  
  190.     %exact_duplicate = ();
  191.  
  192.     unless (caller) { 
  193.     $standalone++;
  194.     require Getopt::Std;
  195.     Getopt::Std::getopts('pdvf:')
  196.         or die "Usage: $0 [-v] [-p] [-f splainpod]";
  197.     $PODFILE = $opt_f if $opt_f;
  198.     $DEBUG = 2 if $opt_d;
  199.     $VERBOSE = $opt_v;
  200.     $PRETTY = $opt_p;
  201.     } 
  202.  
  203.     if (open(POD_DIAG, $PODFILE)) {
  204.     warn "Happy happy podfile from real $PODFILE\n" if $DEBUG;
  205.     last CONFIG;
  206.     } 
  207.  
  208.     if (caller) {
  209.     INCPATH: {
  210.         if ($^O eq 'MacOS') {
  211.             for $file ( (map { /:$/ ? "$_$WHOAMI.pm" : "$_:$WHOAMI.pm" } @INC), $0) {
  212.             warn "Checking $file\n" if $DEBUG;
  213.             if (open(POD_DIAG, $file)) {
  214.                 while (<POD_DIAG>) {
  215.                 next unless /^__END__\s*# wish diag dbase were more accessible/;
  216.                 print STDERR "podfile is $file\n" if $DEBUG;
  217.                 last INCPATH;
  218.             }
  219.             }
  220.         }
  221.         } else {
  222.             for $file ( (map { "$_/$WHOAMI.pm" } @INC), $0) {
  223.             warn "Checking $file\n" if $DEBUG;
  224.             if (open(POD_DIAG, $file)) {
  225.                 while (<POD_DIAG>) {
  226.                 next unless /^__END__\s*# wish diag dbase were more accessible/;
  227.                 print STDERR "podfile is $file\n" if $DEBUG;
  228.                 last INCPATH;
  229.             }
  230.             }
  231.         }
  232.         }
  233.     }
  234.     } else { 
  235.     print STDERR "podfile is <DATA>\n" if $DEBUG;
  236.     *POD_DIAG = *main::DATA;
  237.     }
  238. }
  239. if (eof(POD_DIAG)) { 
  240.     die "couldn't find diagnostic data in $PODFILE @INC $0";
  241. }
  242.  
  243.  
  244. %HTML_2_Troff = (
  245.     'amp'    =>    '&',    #   ampersand
  246.     'lt'    =>    '<',    #   left chevron, less-than
  247.     'gt'    =>    '>',    #   right chevron, greater-than
  248.     'quot'    =>    '"',    #   double quote
  249.  
  250.     "Aacute"    =>    "A\\*'",    #   capital A, acute accent
  251.     # etc
  252.  
  253. );
  254.  
  255. %HTML_2_Latin_1 = (
  256.     'amp'    =>    '&',    #   ampersand
  257.     'lt'    =>    '<',    #   left chevron, less-than
  258.     'gt'    =>    '>',    #   right chevron, greater-than
  259.     'quot'    =>    '"',    #   double quote
  260.  
  261.     "Aacute"    =>    "\xC1"    #   capital A, acute accent
  262.  
  263.     # etc
  264. );
  265.  
  266. %HTML_2_ASCII_7 = (
  267.     'amp'    =>    '&',    #   ampersand
  268.     'lt'    =>    '<',    #   left chevron, less-than
  269.     'gt'    =>    '>',    #   right chevron, greater-than
  270.     'quot'    =>    '"',    #   double quote
  271.  
  272.     "Aacute"    =>    "A"    #   capital A, acute accent
  273.     # etc
  274. );
  275.  
  276. *HTML_Escapes = do {
  277.     if ($standalone) {
  278.     $PRETTY ? \%HTML_2_Latin_1 : \%HTML_2_ASCII_7; 
  279.     } else {
  280.     \%HTML_2_Latin_1; 
  281.     }
  282. }; 
  283.  
  284. *THITHER = $standalone ? *STDOUT : *STDERR;
  285.  
  286. $transmo = <<EOFUNC;
  287. sub transmo {
  288.     local \$^W = 0;  # recursive warnings we do NOT need!
  289.     study;
  290. EOFUNC
  291.  
  292. ### sub finish_compilation {  # 5.001e panic: top_level for embedded version
  293.     print STDERR "FINISHING COMPILATION for $_\n" if $DEBUG;
  294.     ### local 
  295.     $RS = '';
  296.     local $_;
  297.     while (<POD_DIAG>) {
  298.     #s/(.*)\n//;
  299.     #$header = $1;
  300.  
  301.     unescape();
  302.     if ($PRETTY) {
  303.         sub noop   { return $_[0] }  # spensive for a noop
  304.         sub bold   { my $str =$_[0];  $str =~ s/(.)/$1\b$1/g; return $str; } 
  305.         sub italic { my $str = $_[0]; $str =~ s/(.)/_\b$1/g;  return $str; } 
  306.         s/[BC]<(.*?)>/bold($1)/ges;
  307.         s/[LIF]<(.*?)>/italic($1)/ges;
  308.     } else {
  309.         s/[BC]<(.*?)>/$1/gs;
  310.         s/[LIF]<(.*?)>/$1/gs;
  311.     } 
  312.     unless (/^=/) {
  313.         if (defined $header) { 
  314.         if ( $header eq 'DESCRIPTION' && 
  315.             (   /Optional warnings are enabled/ 
  316.              || /Some of these messages are generic./
  317.             ) )
  318.         {
  319.             next;
  320.         } 
  321.         s/^/    /gm;
  322.         $msg{$header} .= $_;
  323.         }
  324.         next;
  325.     } 
  326.     unless ( s/=item (.*)\s*\Z//) {
  327.  
  328.         if ( s/=head1\sDESCRIPTION//) {
  329.         $msg{$header = 'DESCRIPTION'} = '';
  330.         }
  331.         next;
  332.     }
  333.  
  334.     # strip formatting directives in =item line
  335.     ($header = $1) =~ s/[A-Z]<(.*?)>/$1/g;
  336.  
  337.     if ($header =~ /%[sd]/) {
  338.         $rhs = $lhs = $header;
  339.         #if ($lhs =~ s/(.*?)%d(?!%d)(.*)/\Q$1\E\\d+\Q$2\E\$/g)  {
  340.         if ($lhs =~ s/(.*?)%d(?!%d)(.*)/\Q$1\E\\d+\Q$2\E/g)  {
  341.         $lhs =~ s/\\%s/.*?/g;
  342.         } else {
  343.         # if i had lookbehind negations, i wouldn't have to do this \377 noise
  344.         $lhs =~ s/(.*?)%s/\Q$1\E.*?\377/g;
  345.         #$lhs =~ s/\377([^\377]*)$/\Q$1\E\$/;
  346.         $lhs =~ s/\377([^\377]*)$/\Q$1\E/;
  347.         $lhs =~ s/\377//g;
  348.         $lhs =~ s/\.\*\?$/.*/; # Allow %s at the end to eat it all
  349.         } 
  350.         $transmo .= "    s{^$lhs}\n     {\Q$rhs\E}s\n\t&& return 1;\n";
  351.     } else {
  352.         $transmo .= "    m{^\Q$header\E} && return 1;\n";
  353.     } 
  354.  
  355.     print STDERR "$WHOAMI: Duplicate entry: \"$header\"\n"
  356.         if $msg{$header};
  357.  
  358.     $msg{$header} = '';
  359.     } 
  360.  
  361.  
  362.     close POD_DIAG unless *main::DATA eq *POD_DIAG;
  363.  
  364.     die "No diagnostics?" unless %msg;
  365.  
  366.     $transmo .= "    return 0;\n}\n";
  367.     print STDERR $transmo if $DEBUG;
  368.     eval $transmo;
  369.     die $@ if $@;
  370.     $RS = "\n";
  371. ### }
  372.  
  373. if ($standalone) {
  374.     if (!@ARGV and -t STDIN) { print STDERR "$0: Reading from STDIN\n" } 
  375.     while (defined ($error = <>)) {
  376.     splainthis($error) || print THITHER $error;
  377.     } 
  378.     exit;
  379. } else { 
  380.     $old_w = 0; $oldwarn = ''; $olddie = '';
  381. }
  382.  
  383. sub import {
  384.     shift;
  385.     $old_w = $^W;
  386.     $^W = 1; # yup, clobbered the global variable; tough, if you
  387.          # want diags, you want diags.
  388.     return if $SIG{__WARN__} eq \&warn_trap;
  389.  
  390.     for (@_) {
  391.  
  392.     /^-d(ebug)?$/            && do {
  393.                     $DEBUG++;
  394.                     next;
  395.                    };
  396.  
  397.     /^-v(erbose)?$/     && do {
  398.                     $VERBOSE++;
  399.                     next;
  400.                    };
  401.  
  402.     /^-p(retty)?$/         && do {
  403.                     print STDERR "$0: I'm afraid it's too late for prettiness.\n";
  404.                     $PRETTY++;
  405.                     next;
  406.                    };
  407.  
  408.     warn "Unknown flag: $_";
  409.     } 
  410.  
  411.     $oldwarn = $SIG{__WARN__};
  412.     $olddie = $SIG{__DIE__};
  413.     $SIG{__WARN__} = \&warn_trap;
  414.     $SIG{__DIE__} = \&death_trap;
  415.  
  416. sub enable { &import }
  417.  
  418. sub disable {
  419.     shift;
  420.     $^W = $old_w;
  421.     return unless $SIG{__WARN__} eq \&warn_trap;
  422.     $SIG{__WARN__} = $oldwarn;
  423.     $SIG{__DIE__} = $olddie;
  424.  
  425. sub warn_trap {
  426.     my $warning = $_[0];
  427.     if (caller eq $WHOAMI or !splainthis($warning)) {
  428.     print STDERR $warning;
  429.     } 
  430.     &$oldwarn if defined $oldwarn and $oldwarn and $oldwarn ne \&warn_trap;
  431. };
  432.  
  433. sub death_trap {
  434.     my $exception = $_[0];
  435.  
  436.     # See if we are coming from anywhere within an eval. If so we don't
  437.     # want to explain the exception because it's going to get caught.
  438.     my $in_eval = 0;
  439.     my $i = 0;
  440.     while (1) {
  441.       my $caller = (caller($i++))[3] or last;
  442.       if ($caller eq '(eval)') {
  443.     $in_eval = 1;
  444.     last;
  445.       }
  446.     }
  447.  
  448.     splainthis($exception) unless $in_eval;
  449.     if (caller eq $WHOAMI) { print STDERR "INTERNAL EXCEPTION: $exception"; } 
  450.     &$olddie if defined $olddie and $olddie and $olddie ne \&death_trap;
  451.  
  452.     # We don't want to unset these if we're coming from an eval because
  453.     # then we've turned off diagnostics. (Actually what does this next
  454.     # line do?  -PSeibel)
  455.     $SIG{__DIE__} = $SIG{__WARN__} = '' unless $in_eval;
  456.     local($Carp::CarpLevel) = 1;
  457.     confess "Uncaught exception from user code:\n\t$exception";
  458.     # up we go; where we stop, nobody knows, but i think we die now
  459.     # but i'm deeply afraid of the &$olddie guy reraising and us getting
  460.     # into an indirect recursion loop
  461. };
  462.  
  463. sub splainthis {
  464.     local $_ = shift;
  465.     local $\;
  466.     ### &finish_compilation unless %msg;
  467.     s/\.?\n+$//;
  468.     my $orig = $_;
  469.     # return unless defined;
  470.     if ($exact_duplicate{$_}++) {
  471.     return 1;
  472.     } 
  473.     if ($^O eq 'MacOS') {
  474.         s/^# //gm;
  475.        s/.?\s*\nFile \'(.*?)\'; Line (\d+)/ at $1 line $2/mi;
  476.     }
  477.     s/, <.*?> (?:line|chunk).*$//;
  478.     $real = s/(.*?) at .*? (?:line|chunk) \d+.*/$1/;
  479.     s/^\((.*)\)$/$1/;
  480.     return 0 unless &transmo;
  481.     $orig = shorten($orig);
  482.     if ($old_diag{$_}) {
  483.     autodescribe();
  484.     if ($^O eq 'MacOS') {
  485.         print THITHER "$orig # (#$old_diag{$_})\n";
  486.     } else {
  487.         print THITHER "$orig (#$old_diag{$_})\n";
  488.     }
  489.     $wantspace = 1;
  490.     } else {
  491.     autodescribe();
  492.     $old_diag{$_} = ++$count;
  493.     print THITHER "\n" if $wantspace;
  494.     $wantspace = 0;
  495.     if ($^O eq 'MacOS') {
  496.         print THITHER "$orig # (#$old_diag{$_})\n";
  497.     } else {
  498.         print THITHER "$orig (#$old_diag{$_})\n";
  499.     }
  500.     if ($msg{$_}) {
  501.         print THITHER $msg{$_};
  502.     } else {
  503.         if (0 and $standalone) { 
  504.         print THITHER "    **** Error #$old_diag{$_} ",
  505.             ($real ? "is" : "appears to be"),
  506.             " an unknown diagnostic message.\n\n";
  507.         }
  508.         return 0;
  509.     } 
  510.     }
  511.     return 1;
  512.  
  513. sub autodescribe {
  514.     if ($VERBOSE and not $count) {
  515.     print THITHER &{$PRETTY ? \&bold : \&noop}("DESCRIPTION OF DIAGNOSTICS"),
  516.         "\n$msg{DESCRIPTION}\n";
  517.     } 
  518.  
  519. sub unescape { 
  520.     s {
  521.             E<  
  522.             ( [A-Za-z]+ )       
  523.             >   
  524.     } { 
  525.          do {   
  526.              exists $HTML_Escapes{$1}
  527.                 ? do { $HTML_Escapes{$1} }
  528.                 : do {
  529.                     warn "Unknown escape: E<$1> in $_";
  530.                     "E<$1>";
  531.                 } 
  532.          } 
  533.     }egx;
  534. }
  535.  
  536. sub shorten {
  537.     my $line = $_[0];
  538.     if (length($line) > 79 and index($line, "\n") == -1) {
  539.     my $space_place = rindex($line, ' ', 79);
  540.     if ($space_place != -1) {
  541.         substr($line, $space_place, 1) = "\n\t";
  542.     } 
  543.     } 
  544.     return $line;
  545.  
  546.  
  547. # have to do this: RS isn't set until run time, but we're executing at compile time
  548. $RS = "\n";
  549.  
  550. 1 unless $standalone;  # or it'll complain about itself
  551. __END__ # wish diag dbase were more accessible
  552. =head1 NAME
  553.  
  554. perldiag - various Perl diagnostics
  555.  
  556. =head1 DESCRIPTION
  557.  
  558. These messages are classified as follows (listed in increasing order of
  559. desperation):
  560.  
  561.     (W) A warning (optional).
  562.     (D) A deprecation (optional).
  563.     (S) A severe warning (mandatory).
  564.     (F) A fatal error (trappable).
  565.     (P) An internal error you should never see (trappable).
  566.     (X) A very fatal error (nontrappable).
  567.     (A) An alien error message (not generated by Perl).
  568.  
  569. Optional warnings are enabled by using the B<-w> switch.  Warnings may
  570. be captured by setting C<$SIG{__WARN__}> to a reference to a routine that
  571. will be called on each warning instead of printing it.  See L<perlvar>.
  572. Trappable errors may be trapped using the eval operator.  See
  573. L<perlfunc/eval>.
  574.  
  575. Some of these messages are generic.  Spots that vary are denoted with a %s,
  576. just as in a printf format.  Note that some messages start with a %s!
  577. The symbols C<"%-?@> sort before the letters, while C<[> and C<\> sort after.
  578.  
  579. =over 4
  580.  
  581. =item "my" variable %s can't be in a package
  582.  
  583. (F) Lexically scoped variables aren't in a package, so it doesn't make sense
  584. to try to declare one with a package qualifier on the front.  Use local()
  585. if you want to localize a package variable.
  586.  
  587. =item "my" variable %s masks earlier declaration in same scope
  588.  
  589. (S) A lexical variable has been redeclared in the same scope, effectively
  590. eliminating all access to the previous instance.  This is almost always
  591. a typographical error.  Note that the earlier variable will still exist
  592. until the end of the scope or until all closure referents to it are
  593. destroyed.
  594.  
  595. =item "no" not allowed in expression
  596.  
  597. (F) The "no" keyword is recognized and executed at compile time, and returns
  598. no useful value.  See L<perlmod>.
  599.  
  600. =item "use" not allowed in expression
  601.  
  602. (F) The "use" keyword is recognized and executed at compile time, and returns
  603. no useful value.  See L<perlmod>.
  604.  
  605. =item % may only be used in unpack
  606.  
  607. (F) You can't pack a string by supplying a checksum, because the
  608. checksumming process loses information, and you can't go the other
  609. way.  See L<perlfunc/unpack>.
  610.  
  611. =item %s (...) interpreted as function
  612.  
  613. (W) You've run afoul of the rule that says that any list operator followed
  614. by parentheses turns into a function, with all the list operators arguments
  615. found inside the parentheses.  See L<perlop/Terms and List Operators (Leftward)>.
  616.  
  617. =item %s argument is not a HASH element
  618.  
  619. (F) The argument to exists() must be a hash element, such as
  620.  
  621.     $foo{$bar}
  622.     $ref->[12]->{"susie"}
  623.  
  624. =item %s argument is not a HASH element or slice
  625.  
  626. (F) The argument to delete() must be either a hash element, such as
  627.  
  628.     $foo{$bar}
  629.     $ref->[12]->{"susie"}
  630.  
  631. or a hash slice, such as
  632.  
  633.     @foo{$bar, $baz, $xyzzy}
  634.     @{$ref->[12]}{"susie", "queue"}
  635.  
  636. =item %s did not return a true value
  637.  
  638. (F) A required (or used) file must return a true value to indicate that
  639. it compiled correctly and ran its initialization code correctly.  It's
  640. traditional to end such a file with a "1;", though any true value would
  641. do.  See L<perlfunc/require>.
  642.  
  643. =item %s found where operator expected
  644.  
  645. (S) The Perl lexer knows whether to expect a term or an operator.  If it
  646. sees what it knows to be a term when it was expecting to see an operator,
  647. it gives you this warning.  Usually it indicates that an operator or
  648. delimiter was omitted, such as a semicolon.
  649.  
  650. =item %s had compilation errors
  651.  
  652. (F) The final summary message when a C<perl -c> fails.
  653.  
  654. =item %s has too many errors
  655.  
  656. (F) The parser has given up trying to parse the program after 10 errors.
  657. Further error messages would likely be uninformative.
  658.  
  659. =item %s matches null string many times
  660.  
  661. (W) The pattern you've specified would be an infinite loop if the
  662. regular expression engine didn't specifically check for that.  See L<perlre>.
  663.  
  664. =item %s never introduced
  665.  
  666. (S) The symbol in question was declared but somehow went out of scope
  667. before it could possibly have been used.
  668.  
  669. =item %s syntax OK
  670.  
  671. (F) The final summary message when a C<perl -c> succeeds.
  672.  
  673. =item %s: Command not found
  674.  
  675. (A) You've accidentally run your script through B<csh> instead
  676. of Perl.  Check the #! line, or manually feed your script into
  677. Perl yourself.
  678.  
  679. =item %s: Expression syntax
  680.  
  681. (A) You've accidentally run your script through B<csh> instead
  682. of Perl.  Check the #! line, or manually feed your script into
  683. Perl yourself.
  684.  
  685. =item %s: Undefined variable
  686.  
  687. (A) You've accidentally run your script through B<csh> instead
  688. of Perl.  Check the #! line, or manually feed your script into
  689. Perl yourself.
  690.  
  691. =item %s: not found
  692.  
  693. (A) You've accidentally run your script through the Bourne shell
  694. instead of Perl.  Check the #! line, or manually feed your script
  695. into Perl yourself.
  696.  
  697. =item B<-P> not allowed for setuid/setgid script
  698.  
  699. (F) The script would have to be opened by the C preprocessor by name,
  700. which provides a race condition that breaks security.
  701.  
  702. =item C<-T> and C<-B> not implemented on filehandles
  703.  
  704. (F) Perl can't peek at the stdio buffer of filehandles when it doesn't
  705. know about your kind of stdio.  You'll have to use a filename instead.
  706.  
  707. =item 500 Server error
  708.  
  709. See Server error.
  710.  
  711. =item ?+* follows nothing in regexp
  712.  
  713. (F) You started a regular expression with a quantifier.  Backslash it
  714. if you meant it literally.   See L<perlre>.
  715.  
  716. =item @ outside of string
  717.  
  718. (F) You had a pack template that specified an absolute position outside
  719. the string being unpacked.  See L<perlfunc/pack>.
  720.  
  721. =item accept() on closed fd
  722.  
  723. (W) You tried to do an accept on a closed socket.  Did you forget to check
  724. the return value of your socket() call?  See L<perlfunc/accept>.
  725.  
  726. =item Allocation too large: %lx
  727.  
  728. (X) You can't allocate more than 64K on an MS-DOS machine.
  729.  
  730. =item Allocation too large
  731.  
  732. (F) You can't allocate more than 2^31+"small amount" bytes.
  733.  
  734. =item Applying %s to %s will act on scalar(%s)
  735.  
  736. (W) The pattern match (//), substitution (s///), and translation (tr///)
  737. operators work on scalar values.  If you apply one of them to an array
  738. or a hash, it will convert the array or hash to a scalar value -- the
  739. length of an array, or the population info of a hash -- and then work on
  740. that scalar value.  This is probably not what you meant to do.  See
  741. L<perlfunc/grep> and L<perlfunc/map> for alternatives.
  742.  
  743. =item Arg too short for msgsnd
  744.  
  745. (F) msgsnd() requires a string at least as long as sizeof(long).
  746.  
  747. =item Ambiguous use of %s resolved as %s
  748.  
  749. (W)(S) You said something that may not be interpreted the way
  750. you thought.  Normally it's pretty easy to disambiguate it by supplying
  751. a missing quote, operator, parenthesis pair or declaration.
  752.  
  753. =item Args must match #! line
  754.  
  755. (F) The setuid emulator requires that the arguments Perl was invoked
  756. with match the arguments specified on the #! line.  Since some systems
  757. impose a one-argument limit on the #! line, try combining switches;
  758. for example, turn C<-w -U> into C<-wU>.
  759.  
  760. =item Argument "%s" isn't numeric%s
  761.  
  762. (W) The indicated string was fed as an argument to an operator that
  763. expected a numeric value instead.  If you're fortunate the message
  764. will identify which operator was so unfortunate.
  765.  
  766. =item Array @%s missing the @ in argument %d of %s()
  767.  
  768. (D) Really old Perl let you omit the @ on array names in some spots.  This
  769. is now heavily deprecated.
  770.  
  771. =item assertion botched: %s
  772.  
  773. (P) The malloc package that comes with Perl had an internal failure.
  774.  
  775. =item Assertion failed: file "%s"
  776.  
  777. (P) A general assertion failed.  The file in question must be examined.
  778.  
  779. =item Assignment to both a list and a scalar
  780.  
  781. (F) If you assign to a conditional operator, the 2nd and 3rd arguments
  782. must either both be scalars or both be lists.  Otherwise Perl won't
  783. know which context to supply to the right side.
  784.  
  785. =item Attempt to free non-arena SV: 0x%lx
  786.  
  787. (P) All SV objects are supposed to be allocated from arenas that will
  788. be garbage collected on exit.  An SV was discovered to be outside any
  789. of those arenas.
  790.  
  791. =item Attempt to free nonexistent shared string
  792.  
  793. (P) Perl maintains a reference counted internal table of strings to
  794. optimize the storage and access of hash keys and other strings.  This
  795. indicates someone tried to decrement the reference count of a string
  796. that can no longer be found in the table.
  797.  
  798. =item Attempt to free temp prematurely
  799.  
  800. (W) Mortalized values are supposed to be freed by the free_tmps()
  801. routine.  This indicates that something else is freeing the SV before
  802. the free_tmps() routine gets a chance, which means that the free_tmps()
  803. routine will be freeing an unreferenced scalar when it does try to free
  804. it.
  805.  
  806. =item Attempt to free unreferenced glob pointers
  807.  
  808. (P) The reference counts got screwed up on symbol aliases.
  809.  
  810. =item Attempt to free unreferenced scalar
  811.  
  812. (W) Perl went to decrement the reference count of a scalar to see if it
  813. would go to 0, and discovered that it had already gone to 0 earlier,
  814. and should have been freed, and in fact, probably was freed.  This
  815. could indicate that SvREFCNT_dec() was called too many times, or that
  816. SvREFCNT_inc() was called too few times, or that the SV was mortalized
  817. when it shouldn't have been, or that memory has been corrupted.
  818.  
  819. =item Attempt to use reference as lvalue in substr
  820.  
  821. (W) You supplied a reference as the first argument to substr() used
  822. as an lvalue, which is pretty strange.  Perhaps you forgot to
  823. dereference it first.  See L<perlfunc/substr>.
  824.  
  825. =item Bad arg length for %s, is %d, should be %d
  826.  
  827. (F) You passed a buffer of the wrong size to one of msgctl(), semctl() or
  828. shmctl().  In C parlance, the correct sizes are, respectively,
  829. S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)>, and
  830. S<sizeof(struct shmid_ds *)>.
  831.  
  832. =item Bad filehandle: %s
  833.  
  834. (F) A symbol was passed to something wanting a filehandle, but the symbol
  835. has no filehandle associated with it.  Perhaps you didn't do an open(), or
  836. did it in another package.
  837.  
  838. =item Bad free() ignored
  839.  
  840. (S) An internal routine called free() on something that had never been
  841. malloc()ed in the first place. Mandatory, but can be disabled by
  842. setting environment variable C<PERL_BADFREE> to 1.
  843.  
  844. This message can be quite often seen with DB_File on systems with
  845. "hard" dynamic linking, like C<AIX> and C<OS/2>. It is a bug of
  846. C<Berkeley DB> which is left unnoticed if C<DB> uses I<forgiving>
  847. system malloc().
  848.  
  849. =item Bad hash
  850.  
  851. (P) One of the internal hash routines was passed a null HV pointer.
  852.  
  853. =item Bad name after %s::
  854.  
  855. (F) You started to name a symbol by using a package prefix, and then didn't
  856. finish the symbol.  In particular, you can't interpolate outside of quotes,
  857. so
  858.  
  859.     $var = 'myvar';
  860.     $sym = mypack::$var;
  861.  
  862. is not the same as
  863.  
  864.     $var = 'myvar';
  865.     $sym = "mypack::$var";
  866.  
  867. =item Bad symbol for array
  868.  
  869. (P) An internal request asked to add an array entry to something that
  870. wasn't a symbol table entry.
  871.  
  872. =item Bad symbol for filehandle
  873.  
  874. (P) An internal request asked to add a filehandle entry to something that
  875. wasn't a symbol table entry.
  876.  
  877. =item Bad symbol for hash
  878.  
  879. (P) An internal request asked to add a hash entry to something that
  880. wasn't a symbol table entry.
  881.  
  882. =item Badly placed ()'s
  883.  
  884. (A) You've accidentally run your script through B<csh> instead
  885. of Perl.  Check the #! line, or manually feed your script into
  886. Perl yourself.
  887.  
  888. =item Bareword "%s" not allowed while "strict subs" in use
  889.  
  890. (F) With "strict subs" in use, a bareword is only allowed as a
  891. subroutine identifier, in curly braces or to the left of the "=>" symbol.
  892. Perhaps you need to predeclare a subroutine?
  893.  
  894. =item BEGIN failed--compilation aborted
  895.  
  896. (F) An untrapped exception was raised while executing a BEGIN subroutine.
  897. Compilation stops immediately and the interpreter is exited.
  898.  
  899. =item BEGIN not safe after errors--compilation aborted
  900.  
  901. (F) Perl found a C<BEGIN {}> subroutine (or a C<use> directive, which
  902. implies a C<BEGIN {}>) after one or more compilation errors had
  903. already occurred.  Since the intended environment for the C<BEGIN {}>
  904. could not be guaranteed (due to the errors), and since subsequent code
  905. likely depends on its correct operation, Perl just gave up.
  906.  
  907. =item bind() on closed fd
  908.  
  909. (W) You tried to do a bind on a closed socket.  Did you forget to check
  910. the return value of your socket() call?  See L<perlfunc/bind>.
  911.  
  912. =item Bizarre copy of %s in %s
  913.  
  914. (P) Perl detected an attempt to copy an internal value that is not copiable.
  915.  
  916. =item Callback called exit
  917.  
  918. (F) A subroutine invoked from an external package via perl_call_sv()
  919. exited by calling exit.
  920.  
  921. =item Can't "goto" outside a block
  922.  
  923. (F) A "goto" statement was executed to jump out of what might look
  924. like a block, except that it isn't a proper block.  This usually
  925. occurs if you tried to jump out of a sort() block or subroutine, which
  926. is a no-no.  See L<perlfunc/goto>.
  927.  
  928. =item Can't "last" outside a block
  929.  
  930. (F) A "last" statement was executed to break out of the current block,
  931. except that there's this itty bitty problem called there isn't a
  932. current block.  Note that an "if" or "else" block doesn't count as a
  933. "loopish" block, as doesn't a block given to sort().  You can usually double
  934. the curlies to get the same effect though, because the inner curlies
  935. will be considered a block that loops once.  See L<perlfunc/last>.
  936.  
  937. =item Can't "next" outside a block
  938.  
  939. (F) A "next" statement was executed to reiterate the current block, but
  940. there isn't a current block.  Note that an "if" or "else" block doesn't
  941. count as a "loopish" block, as doesn't a block given to sort().  You can
  942. usually double the curlies to get the same effect though, because the inner
  943. curlies will be considered a block that loops once.  See L<perlfunc/next>.
  944.  
  945. =item Can't "redo" outside a block
  946.  
  947. (F) A "redo" statement was executed to restart the current block, but
  948. there isn't a current block.  Note that an "if" or "else" block doesn't
  949. count as a "loopish" block, as doesn't a block given to sort().  You can
  950. usually double the curlies to get the same effect though, because the inner
  951. curlies will be considered a block that loops once.  See L<perlfunc/redo>.
  952.  
  953. =item Can't bless non-reference value
  954.  
  955. (F) Only hard references may be blessed.  This is how Perl "enforces"
  956. encapsulation of objects.  See L<perlobj>.
  957.  
  958. =item Can't break at that line
  959.  
  960. (S) A warning intended to only be printed while running within the debugger, indicating
  961. the line number specified wasn't the location of a statement that could
  962. be stopped at.
  963.  
  964. =item Can't call method "%s" in empty package "%s"
  965.  
  966. (F) You called a method correctly, and it correctly indicated a package
  967. functioning as a class, but that package doesn't have ANYTHING defined
  968. in it, let alone methods.  See L<perlobj>.
  969.  
  970. =item Can't call method "%s" on unblessed reference
  971.  
  972. (F) A method call must know in what package it's supposed to run.  It
  973. ordinarily finds this out from the object reference you supply, but
  974. you didn't supply an object reference in this case.  A reference isn't
  975. an object reference until it has been blessed.  See L<perlobj>.
  976.  
  977. =item Can't call method "%s" without a package or object reference
  978.  
  979. (F) You used the syntax of a method call, but the slot filled by the
  980. object reference or package name contains an expression that returns
  981. neither an object reference nor a package name.  (Perhaps it's null?)
  982. Something like this will reproduce the error:
  983.  
  984.     $BADREF = undef;
  985.     process $BADREF 1,2,3;
  986.     $BADREF->process(1,2,3);
  987.  
  988. =item Can't chdir to %s
  989.  
  990. (F) You called C<perl -x/foo/bar>, but C</foo/bar> is not a directory
  991. that you can chdir to, possibly because it doesn't exist.
  992.  
  993. =item Can't coerce %s to integer in %s
  994.  
  995. (F) Certain types of SVs, in particular real symbol table entries
  996. (typeglobs), can't be forced to stop being what they are.  So you can't
  997. say things like:
  998.  
  999.     *foo += 1;
  1000.  
  1001. You CAN say
  1002.  
  1003.     $foo = *foo;
  1004.     $foo += 1;
  1005.  
  1006. but then $foo no longer contains a glob.
  1007.  
  1008. =item Can't coerce %s to number in %s
  1009.  
  1010. (F) Certain types of SVs, in particular real symbol table entries
  1011. (typeglobs), can't be forced to stop being what they are.
  1012.  
  1013. =item Can't coerce %s to string in %s
  1014.  
  1015. (F) Certain types of SVs, in particular real symbol table entries
  1016. (typeglobs), can't be forced to stop being what they are.
  1017.  
  1018. =item Can't create pipe mailbox
  1019.  
  1020. (P) An error peculiar to VMS.  The process is suffering from exhausted quotas
  1021. or other plumbing problems.
  1022.  
  1023. =item Can't declare %s in my
  1024.  
  1025. (F) Only scalar, array, and hash variables may be declared as lexical variables.
  1026. They must have ordinary identifiers as names.
  1027.  
  1028. =item Can't do inplace edit on %s: %s
  1029.  
  1030. (S) The creation of the new file failed for the indicated reason.
  1031.  
  1032. =item Can't do inplace edit without backup
  1033.  
  1034. (F) You're on a system such as MS-DOS that gets confused if you try reading
  1035. from a deleted (but still opened) file.  You have to say C<-i.bak>, or some
  1036. such.
  1037.  
  1038. =item Can't do inplace edit: %s E<gt> 14 characters
  1039.  
  1040. (S) There isn't enough room in the filename to make a backup name for the file.
  1041.  
  1042. =item Can't do inplace edit: %s is not a regular file
  1043.  
  1044. (S) You tried to use the B<-i> switch on a special file, such as a file in
  1045. /dev, or a FIFO.  The file was ignored.
  1046.  
  1047. =item Can't do setegid!
  1048.  
  1049. (P) The setegid() call failed for some reason in the setuid emulator
  1050. of suidperl.
  1051.  
  1052. =item Can't do seteuid!
  1053.  
  1054. (P) The setuid emulator of suidperl failed for some reason.
  1055.  
  1056. =item Can't do setuid
  1057.  
  1058. (F) This typically means that ordinary perl tried to exec suidperl to
  1059. do setuid emulation, but couldn't exec it.  It looks for a name of the
  1060. form sperl5.000 in the same directory that the perl executable resides
  1061. under the name perl5.000, typically /usr/local/bin on Unix machines.
  1062. If the file is there, check the execute permissions.  If it isn't, ask
  1063. your sysadmin why he and/or she removed it.
  1064.  
  1065. =item Can't do waitpid with flags
  1066.  
  1067. (F) This machine doesn't have either waitpid() or wait4(), so only waitpid()
  1068. without flags is emulated.
  1069.  
  1070. =item Can't do {n,m} with n E<gt> m
  1071.  
  1072. (F) Minima must be less than or equal to maxima.  If you really want
  1073. your regexp to match something 0 times, just put {0}.  See L<perlre>.
  1074.  
  1075. =item Can't emulate -%s on #! line
  1076.  
  1077. (F) The #! line specifies a switch that doesn't make sense at this point.
  1078. For example, it'd be kind of silly to put a B<-x> on the #! line.
  1079.  
  1080. =item Can't exec "%s": %s
  1081.  
  1082. (W) An system(), exec(), or piped open call could not execute the named
  1083. program for the indicated reason.  Typical reasons include: the permissions
  1084. were wrong on the file, the file wasn't found in C<$ENV{PATH}>, the
  1085. executable in question was compiled for another architecture, or the
  1086. #! line in a script points to an interpreter that can't be run for
  1087. similar reasons.  (Or maybe your system doesn't support #! at all.)
  1088.  
  1089. =item Can't exec %s
  1090.  
  1091. (F) Perl was trying to execute the indicated program for you because that's
  1092. what the #! line said.  If that's not what you wanted, you may need to
  1093. mention "perl" on the #! line somewhere.
  1094.  
  1095. =item Can't execute %s
  1096.  
  1097. (F) You used the B<-S> switch, but the script to execute could not be found
  1098. in the PATH, or at least not with the correct permissions.
  1099.  
  1100. =item Can't find label %s
  1101.  
  1102. (F) You said to goto a label that isn't mentioned anywhere that it's possible
  1103. for us to go to.  See L<perlfunc/goto>.
  1104.  
  1105. =item Can't find string terminator %s anywhere before EOF
  1106.  
  1107. (F) Perl strings can stretch over multiple lines.  This message means that
  1108. the closing delimiter was omitted.  Because bracketed quotes count nesting
  1109. levels, the following is missing its final parenthesis:
  1110.  
  1111.     print q(The character '(' starts a side comment.)
  1112.  
  1113. =item Can't fork
  1114.  
  1115. (F) A fatal error occurred while trying to fork while opening a pipeline.
  1116.  
  1117. =item Can't get filespec - stale stat buffer?
  1118.  
  1119. (S) A warning peculiar to VMS.  This arises because of the difference between
  1120. access checks under VMS and under the Unix model Perl assumes.  Under VMS,
  1121. access checks are done by filename, rather than by bits in the stat buffer, so
  1122. that ACLs and other protections can be taken into account.  Unfortunately, Perl
  1123. assumes that the stat buffer contains all the necessary information, and passes
  1124. it, instead of the filespec, to the access checking routine.  It will try to
  1125. retrieve the filespec using the device name and FID present in the stat buffer,
  1126. but this works only if you haven't made a subsequent call to the CRTL stat()
  1127. routine, because the device name is overwritten with each call.  If this warning
  1128. appears, the name lookup failed, and the access checking routine gave up and
  1129. returned FALSE, just to be conservative.  (Note: The access checking routine
  1130. knows about the Perl C<stat> operator and file tests, so you shouldn't ever
  1131. see this warning in response to a Perl command; it arises only if some internal
  1132. code takes stat buffers lightly.)
  1133.  
  1134. =item Can't get pipe mailbox device name
  1135.  
  1136. (P) An error peculiar to VMS.  After creating a mailbox to act as a pipe, Perl
  1137. can't retrieve its name for later use.
  1138.  
  1139. =item Can't get SYSGEN parameter value for MAXBUF
  1140.  
  1141. (P) An error peculiar to VMS.  Perl asked $GETSYI how big you want your
  1142. mailbox buffers to be, and didn't get an answer.
  1143.  
  1144. =item Can't goto subroutine outside a subroutine
  1145.  
  1146. (F) The deeply magical "goto subroutine" call can only replace one subroutine
  1147. call for another.  It can't manufacture one out of whole cloth.  In general
  1148. you should be calling it out of only an AUTOLOAD routine anyway.  See
  1149. L<perlfunc/goto>.
  1150.  
  1151. =item Can't localize a reference
  1152.  
  1153. (F) You said something like C<local $$ref>, which is not allowed because
  1154. the compiler can't determine whether $ref will end up pointing to anything
  1155. with a symbol table entry, and a symbol table entry is necessary to
  1156. do a local.
  1157.  
  1158. =item Can't localize lexical variable %s
  1159.  
  1160. (F) You used local on a variable name that was previously declared as a
  1161. lexical variable using "my".  This is not allowed.  If you want to
  1162. localize a package variable of the same name, qualify it with the
  1163. package name.
  1164.  
  1165. =item Can't locate %s in @INC
  1166.  
  1167. (F) You said to do (or require, or use) a file that couldn't be found
  1168. in any of the libraries mentioned in @INC.  Perhaps you need to set the
  1169. PERL5LIB or PERL5OPT environment variable to say where the extra library
  1170. is, or maybe the script needs to add the library name to @INC.  Or maybe
  1171. you just misspelled the name of the file.  See L<perlfunc/require>.
  1172.  
  1173. =item Can't locate object method "%s" via package "%s"
  1174.  
  1175. (F) You called a method correctly, and it correctly indicated a package
  1176. functioning as a class, but that package doesn't define that particular
  1177. method, nor does any of its base classes.  See L<perlobj>.
  1178.  
  1179. =item Can't locate package %s for @%s::ISA
  1180.  
  1181. (W) The @ISA array contained the name of another package that doesn't seem
  1182. to exist.
  1183.  
  1184. =item Can't mktemp()
  1185.  
  1186. (F) The mktemp() routine failed for some reason while trying to process
  1187. a B<-e> switch.  Maybe your /tmp partition is full, or clobbered.
  1188.  
  1189. =item Can't modify %s in %s
  1190.  
  1191. (F) You aren't allowed to assign to the item indicated, or otherwise try to
  1192. change it, such as with an auto-increment.
  1193.  
  1194. =item Can't modify nonexistent substring
  1195.  
  1196. (P) The internal routine that does assignment to a substr() was handed
  1197. a NULL.
  1198.  
  1199. =item Can't msgrcv to read-only var
  1200.  
  1201. (F) The target of a msgrcv must be modifiable to be used as a receive
  1202. buffer.
  1203.  
  1204. =item Can't open %s: %s
  1205.  
  1206. (S) An inplace edit couldn't open the original file for the indicated reason.
  1207. Usually this is because you don't have read permission for the file.
  1208.  
  1209. =item Can't open bidirectional pipe
  1210.  
  1211. (W) You tried to say C<open(CMD, "|cmd|")>, which is not supported.  You can
  1212. try any of several modules in the Perl library to do this, such as
  1213. IPC::Open2.  Alternately, direct the pipe's output to a file using "E<gt>",
  1214. and then read it in under a different file handle.
  1215.  
  1216. =item Can't open error file %s as stderr
  1217.  
  1218. (F) An error peculiar to VMS.  Perl does its own command line redirection, and
  1219. couldn't open the file specified after '2E<gt>' or '2E<gt>E<gt>' on the
  1220. command line for writing.
  1221.  
  1222. =item Can't open input file %s as stdin
  1223.  
  1224. (F) An error peculiar to VMS.  Perl does its own command line redirection, and
  1225. couldn't open the file specified after 'E<lt>' on the command line for reading.
  1226.  
  1227. =item Can't open output file %s as stdout
  1228.  
  1229. (F) An error peculiar to VMS.  Perl does its own command line redirection, and
  1230. couldn't open the file specified after 'E<gt>' or 'E<gt>E<gt>' on the command
  1231. line for writing.
  1232.  
  1233. =item Can't open output pipe (name: %s)
  1234.  
  1235. (P) An error peculiar to VMS.  Perl does its own command line redirection, and
  1236. couldn't open the pipe into which to send data destined for stdout.
  1237.  
  1238. =item Can't open perl script "%s": %s
  1239.  
  1240. (F) The script you specified can't be opened for the indicated reason.
  1241.  
  1242. =item Can't redefine active sort subroutine %s
  1243.  
  1244. (F) Perl optimizes the internal handling of sort subroutines and keeps
  1245. pointers into them.  You tried to redefine one such sort subroutine when it
  1246. was currently active, which is not allowed.  If you really want to do
  1247. this, you should write C<sort { &func } @x> instead of C<sort func @x>.
  1248.  
  1249. =item Can't rename %s to %s: %s, skipping file
  1250.  
  1251. (S) The rename done by the B<-i> switch failed for some reason, probably because
  1252. you don't have write permission to the directory.
  1253.  
  1254. =item Can't reopen input pipe (name: %s) in binary mode
  1255.  
  1256. (P) An error peculiar to VMS.  Perl thought stdin was a pipe, and tried to
  1257. reopen it to accept binary data.  Alas, it failed.
  1258.  
  1259. =item Can't reswap uid and euid
  1260.  
  1261. (P) The setreuid() call failed for some reason in the setuid emulator
  1262. of suidperl.
  1263.  
  1264. =item Can't return outside a subroutine
  1265.  
  1266. (F) The return statement was executed in mainline code, that is, where
  1267. there was no subroutine call to return out of.  See L<perlsub>.
  1268.  
  1269. =item Can't stat script "%s"
  1270.  
  1271. (P) For some reason you can't fstat() the script even though you have
  1272. it open already.  Bizarre.
  1273.  
  1274. =item Can't swap uid and euid
  1275.  
  1276. (P) The setreuid() call failed for some reason in the setuid emulator
  1277. of suidperl.
  1278.  
  1279. =item Can't take log of %g
  1280.  
  1281. (F) Logarithms are defined on only positive real numbers.
  1282.  
  1283. =item Can't take sqrt of %g
  1284.  
  1285. (F) For ordinary real numbers, you can't take the square root of a
  1286. negative number.  There's a Complex package available for Perl, though,
  1287. if you really want to do that.
  1288.  
  1289. =item Can't undef active subroutine
  1290.  
  1291. (F) You can't undefine a routine that's currently running.  You can,
  1292. however, redefine it while it's running, and you can even undef the
  1293. redefined subroutine while the old routine is running.  Go figure.
  1294.  
  1295. =item Can't unshift
  1296.  
  1297. (F) You tried to unshift an "unreal" array that can't be unshifted, such
  1298. as the main Perl stack.
  1299.  
  1300. =item Can't upgrade that kind of scalar
  1301.  
  1302. (P) The internal sv_upgrade routine adds "members" to an SV, making
  1303. it into a more specialized kind of SV.  The top several SV types are
  1304. so specialized, however, that they cannot be interconverted.  This
  1305. message indicates that such a conversion was attempted.
  1306.  
  1307. =item Can't upgrade to undef
  1308.  
  1309. (P) The undefined SV is the bottom of the totem pole, in the scheme
  1310. of upgradability.  Upgrading to undef indicates an error in the
  1311. code calling sv_upgrade.
  1312.  
  1313. =item Can't use "my %s" in sort comparison
  1314.  
  1315. (F) The global variables $a and $b are reserved for sort comparisons.
  1316. You mentioned $a or $b in the same line as the E<lt>=E<gt> or cmp operator,
  1317. and the variable had earlier been declared as a lexical variable.
  1318. Either qualify the sort variable with the package name, or rename the
  1319. lexical variable.
  1320.  
  1321. =item Can't use %s for loop variable
  1322.  
  1323. (F) Only a simple scalar variable may be used as a loop variable on a foreach.
  1324.  
  1325. =item Can't use %s ref as %s ref
  1326.  
  1327. (F) You've mixed up your reference types.  You have to dereference a
  1328. reference of the type needed.  You can use the ref() function to
  1329. test the type of the reference, if need be.
  1330.  
  1331. =item Can't use \1 to mean $1 in expression
  1332.  
  1333. (W) In an ordinary expression, backslash is a unary operator that creates
  1334. a reference to its argument.  The use of backslash to indicate a backreference
  1335. to a matched substring is valid only as part of a regular expression pattern.
  1336. Trying to do this in ordinary Perl code produces a value that prints
  1337. out looking like SCALAR(0xdecaf).  Use the $1 form instead.
  1338.  
  1339. =item Can't use bareword ("%s") as %s ref while \"strict refs\" in use
  1340.  
  1341. (F) Only hard references are allowed by "strict refs".  Symbolic references
  1342. are disallowed.  See L<perlref>.
  1343.  
  1344. =item Can't use string ("%s") as %s ref while "strict refs" in use
  1345.  
  1346. (F) Only hard references are allowed by "strict refs".  Symbolic references
  1347. are disallowed.  See L<perlref>.
  1348.  
  1349. =item Can't use an undefined value as %s reference
  1350.  
  1351. (F) A value used as either a hard reference or a symbolic reference must
  1352. be a defined value.  This helps to delurk some insidious errors.
  1353.  
  1354. =item Can't use global %s in "my"
  1355.  
  1356. (F) You tried to declare a magical variable as a lexical variable.  This is
  1357. not allowed, because the magic can be tied to only one location (namely
  1358. the global variable) and it would be incredibly confusing to have
  1359. variables in your program that looked like magical variables but
  1360. weren't.
  1361.  
  1362. =item Can't use subscript on %s
  1363.  
  1364. (F) The compiler tried to interpret a bracketed expression as a
  1365. subscript.  But to the left of the brackets was an expression that
  1366. didn't look like an array reference, or anything else subscriptable.
  1367.  
  1368. =item Can't write to temp file for B<-e>: %s
  1369.  
  1370. (F) The write routine failed for some reason while trying to process
  1371. a B<-e> switch.  Maybe your /tmp partition is full, or clobbered.
  1372.  
  1373. =item Can't x= to read-only value
  1374.  
  1375. (F) You tried to repeat a constant value (often the undefined value) with
  1376. an assignment operator, which implies modifying the value itself.
  1377. Perhaps you need to copy the value to a temporary, and repeat that.
  1378.  
  1379. =item Cannot open temporary file
  1380.  
  1381. (F) The create routine failed for some reason while trying to process
  1382. a B<-e> switch.  Maybe your /tmp partition is full, or clobbered.
  1383.  
  1384. =item Cannot resolve method `%s' overloading `%s' in package `%s'
  1385.  
  1386. (F|P) Error resolving overloading specified by a method name (as
  1387. opposed to a subroutine reference): no such method callable via the
  1388. package. If method name is C<???>, this is an internal error.
  1389.  
  1390. =item chmod: mode argument is missing initial 0
  1391.  
  1392. (W) A novice will sometimes say
  1393.  
  1394.     chmod 777, $filename
  1395.  
  1396. not realizing that 777 will be interpreted as a decimal number, equivalent
  1397. to 01411.  Octal constants are introduced with a leading 0 in Perl, as in C.
  1398.  
  1399. =item Close on unopened file E<lt>%sE<gt>
  1400.  
  1401. (W) You tried to close a filehandle that was never opened.
  1402.  
  1403. =item Compilation failed in require
  1404.  
  1405. (F) Perl could not compile a file specified in a C<require> statement.
  1406. Perl uses this generic message when none of the errors that it encountered
  1407. were severe enough to halt compilation immediately.
  1408.  
  1409. =item connect() on closed fd
  1410.  
  1411. (W) You tried to do a connect on a closed socket.  Did you forget to check
  1412. the return value of your socket() call?  See L<perlfunc/connect>.
  1413.  
  1414. =item Constant subroutine %s redefined
  1415.  
  1416. (S) You redefined a subroutine which had previously been eligible for
  1417. inlining.  See L<perlsub/"Constant Functions"> for commentary and
  1418. workarounds.
  1419.  
  1420. =item Constant subroutine %s undefined
  1421.  
  1422. (S) You undefined a subroutine which had previously been eligible for
  1423. inlining.  See L<perlsub/"Constant Functions"> for commentary and
  1424. workarounds.
  1425.  
  1426. =item Copy method did not return a reference
  1427.  
  1428. (F) The method which overloads "=" is buggy. See L<overload/Copy Constructor>.
  1429.  
  1430. =item Corrupt malloc ptr 0x%lx at 0x%lx
  1431.  
  1432. (P) The malloc package that comes with Perl had an internal failure.
  1433.  
  1434. =item corrupted regexp pointers
  1435.  
  1436. (P) The regular expression engine got confused by what the regular
  1437. expression compiler gave it.
  1438.  
  1439. =item corrupted regexp program
  1440.  
  1441. (P) The regular expression engine got passed a regexp program without
  1442. a valid magic number.
  1443.  
  1444. =item Deep recursion on subroutine "%s"
  1445.  
  1446. (W) This subroutine has called itself (directly or indirectly) 100
  1447. times than it has returned.  This probably indicates an infinite
  1448. recursion, unless you're writing strange benchmark programs, in which
  1449. case it indicates something else.
  1450.  
  1451. =item Delimiter for here document is too long
  1452.  
  1453. (F) In a here document construct like C<E<lt>E<lt>FOO>, the label
  1454. C<FOO> is too long for Perl to handle.  You have to be seriously
  1455. twisted to write code that triggers this error.
  1456.  
  1457. =item Did you mean &%s instead?
  1458.  
  1459. (W) You probably referred to an imported subroutine &FOO as $FOO or some such.
  1460.  
  1461. =item Did you mean $ or @ instead of %?
  1462.  
  1463. (W) You probably said %hash{$key} when you meant $hash{$key} or @hash{@keys}.
  1464. On the other hand, maybe you just meant %hash and got carried away.
  1465.  
  1466. =item Died
  1467.  
  1468. (F) You passed die() an empty string (the equivalent of C<die "">) or
  1469. you called it with no args and both C<$@> and C<$_> were empty.
  1470.  
  1471. =item Do you need to predeclare %s?
  1472.  
  1473. (S) This is an educated guess made in conjunction with the message "%s
  1474. found where operator expected".  It often means a subroutine or module
  1475. name is being referenced that hasn't been declared yet.  This may be
  1476. because of ordering problems in your file, or because of a missing
  1477. "sub", "package", "require", or "use" statement.  If you're
  1478. referencing something that isn't defined yet, you don't actually have
  1479. to define the subroutine or package before the current location.  You
  1480. can use an empty "sub foo;" or "package FOO;" to enter a "forward"
  1481. declaration.
  1482.  
  1483. =item Don't know how to handle magic of type '%s'
  1484.  
  1485. (P) The internal handling of magical variables has been cursed.
  1486.  
  1487. =item do_study: out of memory
  1488.  
  1489. (P) This should have been caught by safemalloc() instead.
  1490.  
  1491. =item Duplicate free() ignored
  1492.  
  1493. (S) An internal routine called free() on something that had already
  1494. been freed.
  1495.  
  1496. =item elseif should be elsif
  1497.  
  1498. (S) There is no keyword "elseif" in Perl because Larry thinks it's
  1499. ugly.  Your code will be interpreted as an attempt to call a method
  1500. named "elseif" for the class returned by the following block.  This is
  1501. unlikely to be what you want.
  1502.  
  1503. =item END failed--cleanup aborted
  1504.  
  1505. (F) An untrapped exception was raised while executing an END subroutine.
  1506. The interpreter is immediately exited.
  1507.  
  1508. =item Error converting file specification %s
  1509.  
  1510. (F) An error peculiar to VMS.  Because Perl may have to deal with file
  1511. specifications in either VMS or Unix syntax, it converts them to a
  1512. single form when it must operate on them directly.  Either you've
  1513. passed an invalid file specification to Perl, or you've found a
  1514. case the conversion routines don't handle.  Drat.
  1515.  
  1516. =item Excessively long <> operator
  1517.  
  1518. (F) The contents of a <> operator may not exceed the maximum size of a
  1519. Perl identifier.  If you're just trying to glob a long list of
  1520. filenames, try using the glob() operator, or put the filenames into a
  1521. variable and glob that.
  1522.  
  1523. =item Execution of %s aborted due to compilation errors
  1524.  
  1525. (F) The final summary message when a Perl compilation fails.
  1526.  
  1527. =item Exiting eval via %s
  1528.  
  1529. (W) You are exiting an eval by unconventional means, such as
  1530. a goto, or a loop control statement.
  1531.  
  1532. =item Exiting pseudo-block via %s
  1533.  
  1534. (W) You are exiting a rather special block construct (like a sort block or
  1535. subroutine) by unconventional means, such as a goto, or a loop control
  1536. statement.  See L<perlfunc/sort>.
  1537.  
  1538. =item Exiting subroutine via %s
  1539.  
  1540. (W) You are exiting a subroutine by unconventional means, such as
  1541. a goto, or a loop control statement.
  1542.  
  1543. =item Exiting substitution via %s
  1544.  
  1545. (W) You are exiting a substitution by unconventional means, such as
  1546. a return, a goto, or a loop control statement.
  1547.  
  1548. =item Fatal VMS error at %s, line %d
  1549.  
  1550. (P) An error peculiar to VMS.  Something untoward happened in a VMS system
  1551. service or RTL routine; Perl's exit status should provide more details.  The
  1552. filename in "at %s" and the line number in "line %d" tell you which section of
  1553. the Perl source code is distressed.
  1554.  
  1555. =item fcntl is not implemented
  1556.  
  1557. (F) Your machine apparently doesn't implement fcntl().  What is this, a
  1558. PDP-11 or something?
  1559.  
  1560. =item Filehandle %s never opened
  1561.  
  1562. (W) An I/O operation was attempted on a filehandle that was never initialized.
  1563. You need to do an open() or a socket() call, or call a constructor from
  1564. the FileHandle package.
  1565.  
  1566. =item Filehandle %s opened for only input
  1567.  
  1568. (W) You tried to write on a read-only filehandle.  If you
  1569. intended it to be a read-write filehandle, you needed to open it with
  1570. "+E<lt>" or "+E<gt>" or "+E<gt>E<gt>" instead of with "E<lt>" or nothing.  If
  1571. you intended only to write the file, use "E<gt>" or "E<gt>E<gt>".  See
  1572. L<perlfunc/open>.
  1573.  
  1574. =item Filehandle opened for only input
  1575.  
  1576. (W) You tried to write on a read-only filehandle.  If you
  1577. intended it to be a read-write filehandle, you needed to open it with
  1578. "+E<lt>" or "+E<gt>" or "+E<gt>E<gt>" instead of with "E<lt>" or nothing.  If
  1579. you intended only to write the file, use "E<gt>" or "E<gt>E<gt>".  See
  1580. L<perlfunc/open>.
  1581.  
  1582. =item Final $ should be \$ or $name
  1583.  
  1584. (F) You must now decide whether the final $ in a string was meant to be
  1585. a literal dollar sign, or was meant to introduce a variable name
  1586. that happens to be missing.  So you have to put either the backslash or
  1587. the name.
  1588.  
  1589. =item Final @ should be \@ or @name
  1590.  
  1591. (F) You must now decide whether the final @ in a string was meant to be
  1592. a literal "at" sign, or was meant to introduce a variable name
  1593. that happens to be missing.  So you have to put either the backslash or
  1594. the name.
  1595.  
  1596. =item Format %s redefined
  1597.  
  1598. (W) You redefined a format.  To suppress this warning, say
  1599.  
  1600.     {
  1601.     local $^W = 0;
  1602.     eval "format NAME =...";
  1603.     }
  1604.  
  1605. =item Format not terminated
  1606.  
  1607. (F) A format must be terminated by a line with a solitary dot.  Perl got
  1608. to the end of your file without finding such a line.
  1609.  
  1610. =item Found = in conditional, should be ==
  1611.  
  1612. (W) You said
  1613.  
  1614.     if ($foo = 123)
  1615.  
  1616. when you meant
  1617.  
  1618.     if ($foo == 123)
  1619.  
  1620. (or something like that).
  1621.  
  1622. =item gdbm store returned %d, errno %d, key "%s"
  1623.  
  1624. (S) A warning from the GDBM_File extension that a store failed.
  1625.  
  1626. =item gethostent not implemented
  1627.  
  1628. (F) Your C library apparently doesn't implement gethostent(), probably
  1629. because if it did, it'd feel morally obligated to return every hostname
  1630. on the Internet.
  1631.  
  1632. =item get{sock,peer}name() on closed fd
  1633.  
  1634. (W) You tried to get a socket or peer socket name on a closed socket.
  1635. Did you forget to check the return value of your socket() call?
  1636.  
  1637. =item getpwnam returned invalid UIC %#o for user "%s"
  1638.  
  1639. (S) A warning peculiar to VMS.  The call to C<sys$getuai> underlying the
  1640. C<getpwnam> operator returned an invalid UIC.
  1641.  
  1642.  
  1643. =item Glob not terminated
  1644.  
  1645. (F) The lexer saw a left angle bracket in a place where it was expecting
  1646. a term, so it's looking for the corresponding right angle bracket, and not
  1647. finding it.  Chances are you left some needed parentheses out earlier in
  1648. the line, and you really meant a "less than".
  1649.  
  1650. =item Global symbol "%s" requires explicit package name
  1651.  
  1652. (F) You've said "use strict vars", which indicates that all variables
  1653. must either be lexically scoped (using "my"), or explicitly qualified to
  1654. say which package the global variable is in (using "::").
  1655.  
  1656. =item goto must have label
  1657.  
  1658. (F) Unlike with "next" or "last", you're not allowed to goto an
  1659. unspecified destination.  See L<perlfunc/goto>.
  1660.  
  1661. =item Had to create %s unexpectedly
  1662.  
  1663. (S) A routine asked for a symbol from a symbol table that ought to have
  1664. existed already, but for some reason it didn't, and had to be created on
  1665. an emergency basis to prevent a core dump.
  1666.  
  1667. =item Hash %%s missing the % in argument %d of %s()
  1668.  
  1669. (D) Really old Perl let you omit the % on hash names in some spots.  This
  1670. is now heavily deprecated.
  1671.  
  1672. =item Identifier too long
  1673.  
  1674. (F) Perl limits identifiers (names for variables, functions, etc.) to
  1675. about 250 characters for simple names, and somewhat more for compound
  1676. names (like C<$A::B>).  You've exceeded Perl's limits.  Future
  1677. versions of Perl are likely to eliminate these arbitrary limitations.
  1678.  
  1679. =item Ill-formed logical name |%s| in prime_env_iter
  1680.  
  1681. (W) A warning peculiar to VMS.  A logical name was encountered when preparing
  1682. to iterate over %ENV which violates the syntactic rules governing logical
  1683. names.  Because it cannot be translated normally, it is skipped, and will not
  1684. appear in %ENV.  This may be a benign occurrence, as some software packages
  1685. might directly modify logical name tables and introduce nonstandard names,
  1686. or it may indicate that a logical name table has been corrupted.
  1687.  
  1688. =item Illegal character %s (carriage return)
  1689.  
  1690. (F) A carriage return character was found in the input.  This is an
  1691. error, and not a warning, because carriage return characters can break
  1692. multi-line strings, including here documents (e.g., C<print E<lt>E<lt>EOF;>).
  1693.  
  1694. Under Unix, this error is usually caused by executing Perl code --
  1695. either the main program, a module, or an eval'd string -- that was
  1696. transferred over a network connection from a non-Unix system without
  1697. properly converting the text file format.
  1698.  
  1699. Under systems that use something other than '\n' to delimit lines of
  1700. text, this error can also be caused by reading Perl code from a file
  1701. handle that is in binary mode (as set by the C<binmode> operator).
  1702.  
  1703. In either case, the Perl code in question will probably need to be
  1704. converted with something like C<s/\x0D\x0A?/\n/g> before it can be
  1705. executed.
  1706.  
  1707. =item Illegal division by zero
  1708.  
  1709. (F) You tried to divide a number by 0.  Either something was wrong in your
  1710. logic, or you need to put a conditional in to guard against meaningless input.
  1711.  
  1712. =item Illegal modulus zero
  1713.  
  1714. (F) You tried to divide a number by 0 to get the remainder.  Most numbers
  1715. don't take to this kindly.
  1716.  
  1717. =item Illegal octal digit
  1718.  
  1719. (F) You used an 8 or 9 in a octal number.
  1720.  
  1721. =item Illegal octal digit ignored
  1722.  
  1723. (W) You may have tried to use an 8 or 9 in a octal number.  Interpretation
  1724. of the octal number stopped before the 8 or 9.
  1725.  
  1726. =item Illegal switch in PERL5OPT: %s
  1727.  
  1728. (X) The PERL5OPT environment variable may only be used to set the
  1729. following switches: B<-[DIMUdmw]>.
  1730.  
  1731. =item In string, @%s now must be written as \@%s
  1732.  
  1733. (F) It used to be that Perl would try to guess whether you wanted an
  1734. array interpolated or a literal @.  It did this when the string was first
  1735. used at runtime.  Now strings are parsed at compile time, and ambiguous
  1736. instances of @ must be disambiguated, either by prepending a backslash to
  1737. indicate a literal, or by declaring (or using) the array within the
  1738. program before the string (lexically).  (Someday it will simply assume
  1739. that an unbackslashed @ interpolates an array.)
  1740.  
  1741. =item Insecure dependency in %s
  1742.  
  1743. (F) You tried to do something that the tainting mechanism didn't like.
  1744. The tainting mechanism is turned on when you're running setuid or setgid,
  1745. or when you specify B<-T> to turn it on explicitly.  The tainting mechanism
  1746. labels all data that's derived directly or indirectly from the user,
  1747. who is considered to be unworthy of your trust.  If any such data is
  1748. used in a "dangerous" operation, you get this error.  See L<perlsec>
  1749. for more information.
  1750.  
  1751. =item Insecure directory in %s
  1752.  
  1753. (F) You can't use system(), exec(), or a piped open in a setuid or setgid
  1754. script if C<$ENV{PATH}> contains a directory that is writable by the world.
  1755. See L<perlsec>.
  1756.  
  1757. =item Insecure PATH
  1758.  
  1759. (F) You can't use system(), exec(), or a piped open in a setuid or
  1760. setgid script if C<$ENV{PATH}> is derived from data supplied (or
  1761. potentially supplied) by the user.  The script must set the path to a
  1762. known value, using trustworthy data.  See L<perlsec>.
  1763.  
  1764. =item Integer overflow in hex number
  1765.  
  1766. (S) The literal hex number you have specified is too big for your
  1767. architecture. On a 32-bit architecture the largest hex literal is
  1768. 0xFFFFFFFF.
  1769.  
  1770. =item Integer overflow in octal number
  1771.  
  1772. (S) The literal octal number you have specified is too big for your
  1773. architecture. On a 32-bit architecture the largest octal literal is
  1774. 037777777777.
  1775.  
  1776. =item Internal inconsistency in tracking vforks
  1777.  
  1778. (S) A warning peculiar to VMS.  Perl keeps track of the number
  1779. of times you've called C<fork> and C<exec>, to determine
  1780. whether the current call to C<exec> should affect the current
  1781. script or a subprocess (see L<perlvms/exec>).  Somehow, this count
  1782. has become scrambled, so Perl is making a guess and treating
  1783. this C<exec> as a request to terminate the Perl script
  1784. and execute the specified command.
  1785.  
  1786. =item internal disaster in regexp
  1787.  
  1788. (P) Something went badly wrong in the regular expression parser.
  1789.  
  1790. =item internal error: glob failed
  1791.  
  1792. (P) Something went wrong with the external program(s) used for C<glob>
  1793. and C<E<lt>*.cE<gt>>.  This may mean that your csh (C shell) is
  1794. broken.  If so, you should change all of the csh-related variables in
  1795. config.sh:  If you have tcsh, make the variables refer to it as if it
  1796. were csh (e.g. C<full_csh='/usr/bin/tcsh'>); otherwise, make them all
  1797. empty (except that C<d_csh> should be C<'undef'>) so that Perl will
  1798. think csh is missing.  In either case, after editing config.sh, run
  1799. C<./Configure -S> and rebuild Perl.
  1800.  
  1801. =item internal urp in regexp at /%s/
  1802.  
  1803. (P) Something went badly awry in the regular expression parser.
  1804.  
  1805. =item invalid [] range in regexp
  1806.  
  1807. (F) The range specified in a character class had a minimum character
  1808. greater than the maximum character.  See L<perlre>.
  1809.  
  1810. =item Invalid conversion in %s: "%s"
  1811.  
  1812. (W) Perl does not understand the given format conversion.
  1813. See L<perlfunc/sprintf>.
  1814.  
  1815. =item Invalid type in pack: '%s'
  1816.  
  1817. (F) The given character is not a valid pack type.  See L<perlfunc/pack>.
  1818.  
  1819. =item Invalid type in unpack: '%s'
  1820.  
  1821. (F) The given character is not a valid unpack type.  See L<perlfunc/unpack>.
  1822.  
  1823. =item ioctl is not implemented
  1824.  
  1825. (F) Your machine apparently doesn't implement ioctl(), which is pretty
  1826. strange for a machine that supports C.
  1827.  
  1828. =item junk on end of regexp
  1829.  
  1830. (P) The regular expression parser is confused.
  1831.  
  1832. =item Label not found for "last %s"
  1833.  
  1834. (F) You named a loop to break out of, but you're not currently in a
  1835. loop of that name, not even if you count where you were called from.
  1836. See L<perlfunc/last>.
  1837.  
  1838. =item Label not found for "next %s"
  1839.  
  1840. (F) You named a loop to continue, but you're not currently in a loop of
  1841. that name, not even if you count where you were called from.  See
  1842. L<perlfunc/last>.
  1843.  
  1844. =item Label not found for "redo %s"
  1845.  
  1846. (F) You named a loop to restart, but you're not currently in a loop of
  1847. that name, not even if you count where you were called from.  See
  1848. L<perlfunc/last>.
  1849.  
  1850. =item listen() on closed fd
  1851.  
  1852. (W) You tried to do a listen on a closed socket.  Did you forget to check
  1853. the return value of your socket() call?  See L<perlfunc/listen>.
  1854.  
  1855. =item Method for operation %s not found in package %s during blessing
  1856.  
  1857. (F) An attempt was made to specify an entry in an overloading table that
  1858. doesn't resolve to a valid subroutine.  See L<overload>.
  1859.  
  1860. =item Might be a runaway multi-line %s string starting on line %d
  1861.  
  1862. (S) An advisory indicating that the previous error may have been caused
  1863. by a missing delimiter on a string or pattern, because it eventually
  1864. ended earlier on the current line.
  1865.  
  1866. =item Misplaced _ in number
  1867.  
  1868. (W) An underline in a decimal constant wasn't on a 3-digit boundary.
  1869.  
  1870. =item Missing $ on loop variable
  1871.  
  1872. (F) Apparently you've been programming in B<csh> too much.  Variables are always
  1873. mentioned with the $ in Perl, unlike in the shells, where it can vary from
  1874. one line to the next.
  1875.  
  1876. =item Missing comma after first argument to %s function
  1877.  
  1878. (F) While certain functions allow you to specify a filehandle or an
  1879. "indirect object" before the argument list, this ain't one of them.
  1880.  
  1881. =item Missing operator before %s?
  1882.  
  1883. (S) This is an educated guess made in conjunction with the message "%s
  1884. found where operator expected".  Often the missing operator is a comma.
  1885.  
  1886. =item Missing right bracket
  1887.  
  1888. (F) The lexer counted more opening curly brackets (braces) than closing ones.
  1889. As a general rule, you'll find it's missing near the place you were last
  1890. editing.
  1891.  
  1892. =item Missing semicolon on previous line?
  1893.  
  1894. (S) This is an educated guess made in conjunction with the message "%s
  1895. found where operator expected".  Don't automatically put a semicolon on
  1896. the previous line just because you saw this message.
  1897.  
  1898. =item Modification of a read-only value attempted
  1899.  
  1900. (F) You tried, directly or indirectly, to change the value of a
  1901. constant.  You didn't, of course, try "2 = 1", because the compiler
  1902. catches that.  But an easy way to do the same thing is:
  1903.  
  1904.     sub mod { $_[0] = 1 }
  1905.     mod(2);
  1906.  
  1907. Another way is to assign to a substr() that's off the end of the string.
  1908.  
  1909. =item Modification of noncreatable array value attempted, subscript %d
  1910.  
  1911. (F) You tried to make an array value spring into existence, and the
  1912. subscript was probably negative, even counting from end of the array
  1913. backwards.
  1914.  
  1915. =item Modification of noncreatable hash value attempted, subscript "%s"
  1916.  
  1917. (F) You tried to make a hash value spring into existence, and it couldn't
  1918. be created for some peculiar reason.
  1919.  
  1920. =item Module name must be constant
  1921.  
  1922. (F) Only a bare module name is allowed as the first argument to a "use".
  1923.  
  1924. =item msg%s not implemented
  1925.  
  1926. (F) You don't have System V message IPC on your system.
  1927.  
  1928. =item Multidimensional syntax %s not supported
  1929.  
  1930. (W) Multidimensional arrays aren't written like C<$foo[1,2,3]>.  They're written
  1931. like C<$foo[1][2][3]>, as in C.
  1932.  
  1933. =item Name "%s::%s" used only once: possible typo
  1934.  
  1935. (W) Typographical errors often show up as unique variable names.
  1936. If you had a good reason for having a unique name, then just mention
  1937. it again somehow to suppress the message.  The C<use vars> pragma is
  1938. provided for just this purpose.
  1939.  
  1940. =item Negative length
  1941.  
  1942. (F) You tried to do a read/write/send/recv operation with a buffer length
  1943. that is less than 0.  This is difficult to imagine.
  1944.  
  1945. =item nested *?+ in regexp
  1946.  
  1947. (F) You can't quantify a quantifier without intervening parentheses.  So
  1948. things like ** or +* or ?* are illegal.
  1949.  
  1950. Note, however, that the minimal matching quantifiers, C<*?>, C<+?>, and C<??> appear
  1951. to be nested quantifiers, but aren't.  See L<perlre>.
  1952.  
  1953. =item No #! line
  1954.  
  1955. (F) The setuid emulator requires that scripts have a well-formed #! line
  1956. even on machines that don't support the #! construct.
  1957.  
  1958. =item No %s allowed while running setuid
  1959.  
  1960. (F) Certain operations are deemed to be too insecure for a setuid or setgid
  1961. script to even be allowed to attempt.  Generally speaking there will be
  1962. another way to do what you want that is, if not secure, at least securable.
  1963. See L<perlsec>.
  1964.  
  1965. =item No B<-e> allowed in setuid scripts
  1966.  
  1967. (F) A setuid script can't be specified by the user.
  1968.  
  1969. =item No comma allowed after %s
  1970.  
  1971. (F) A list operator that has a filehandle or "indirect object" is not
  1972. allowed to have a comma between that and the following arguments.
  1973. Otherwise it'd be just another one of the arguments.
  1974.  
  1975. One possible cause for this is that you expected to have imported a
  1976. constant to your name space with B<use> or B<import> while no such
  1977. importing took place, it may for example be that your operating system
  1978. does not support that particular constant. Hopefully you did use an
  1979. explicit import list for the constants you expect to see, please see
  1980. L<perlfunc/use> and L<perlfunc/import>. While an explicit import list
  1981. would probably have caught this error earlier it naturally does not
  1982. remedy the fact that your operating system still does not support that
  1983. constant. Maybe you have a typo in the constants of the symbol import
  1984. list of B<use> or B<import> or in the constant name at the line where
  1985. this error was triggered?
  1986.  
  1987. =item No command into which to pipe on command line
  1988.  
  1989. (F) An error peculiar to VMS.  Perl handles its own command line redirection,
  1990. and found a '|' at the end of the command line, so it doesn't know where you
  1991. want to pipe the output from this command.
  1992.  
  1993. =item No DB::DB routine defined
  1994.  
  1995. (F) The currently executing code was compiled with the B<-d> switch,
  1996. but for some reason the perl5db.pl file (or some facsimile thereof)
  1997. didn't define a routine to be called at the beginning of each
  1998. statement.  Which is odd, because the file should have been required
  1999. automatically, and should have blown up the require if it didn't parse
  2000. right.
  2001.  
  2002. =item No dbm on this machine
  2003.  
  2004. (P) This is counted as an internal error, because every machine should
  2005. supply dbm nowadays, because Perl comes with SDBM.  See L<SDBM_File>.
  2006.  
  2007. =item No DBsub routine
  2008.  
  2009. (F) The currently executing code was compiled with the B<-d> switch,
  2010. but for some reason the perl5db.pl file (or some facsimile thereof)
  2011. didn't define a DB::sub routine to be called at the beginning of each
  2012. ordinary subroutine call.
  2013.  
  2014. =item No error file after 2E<gt> or 2E<gt>E<gt> on command line
  2015.  
  2016. (F) An error peculiar to VMS.  Perl handles its own command line redirection,
  2017. and found a '2E<gt>' or a '2E<gt>E<gt>' on the command line, but can't find
  2018. the name of the file to which to write data destined for stderr.
  2019.  
  2020. =item No input file after E<lt> on command line
  2021.  
  2022. (F) An error peculiar to VMS.  Perl handles its own command line redirection,
  2023. and found a 'E<lt>' on the command line, but can't find the name of the file
  2024. from which to read data for stdin.
  2025.  
  2026. =item No output file after E<gt> on command line
  2027.  
  2028. (F) An error peculiar to VMS.  Perl handles its own command line redirection,
  2029. and found a lone 'E<gt>' at the end of the command line, so it doesn't know
  2030. where you wanted to redirect stdout.
  2031.  
  2032. =item No output file after E<gt> or E<gt>E<gt> on command line
  2033.  
  2034. (F) An error peculiar to VMS.  Perl handles its own command line redirection,
  2035. and found a 'E<gt>' or a 'E<gt>E<gt>' on the command line, but can't find the
  2036. name of the file to which to write data destined for stdout.
  2037.  
  2038. =item No Perl script found in input
  2039.  
  2040. (F) You called C<perl -x>, but no line was found in the file beginning
  2041. with #! and containing the word "perl".
  2042.  
  2043. =item No setregid available
  2044.  
  2045. (F) Configure didn't find anything resembling the setregid() call for
  2046. your system.
  2047.  
  2048. =item No setreuid available
  2049.  
  2050. (F) Configure didn't find anything resembling the setreuid() call for
  2051. your system.
  2052.  
  2053. =item No space allowed after B<-I>
  2054.  
  2055. (F) The argument to B<-I> must follow the B<-I> immediately with no
  2056. intervening space.
  2057.  
  2058. =item No such pipe open
  2059.  
  2060. (P) An error peculiar to VMS.  The internal routine my_pclose() tried to
  2061. close a pipe which hadn't been opened.  This should have been caught earlier as
  2062. an attempt to close an unopened filehandle.
  2063.  
  2064. =item No such signal: SIG%s
  2065.  
  2066. (W) You specified a signal name as a subscript to %SIG that was not recognized.
  2067. Say C<kill -l> in your shell to see the valid signal names on your system.
  2068.  
  2069. =item Not a CODE reference
  2070.  
  2071. (F) Perl was trying to evaluate a reference to a code value (that is, a
  2072. subroutine), but found a reference to something else instead.  You can
  2073. use the ref() function to find out what kind of ref it really was.
  2074. See also L<perlref>.
  2075.  
  2076. =item Not a format reference
  2077.  
  2078. (F) I'm not sure how you managed to generate a reference to an anonymous
  2079. format, but this indicates you did, and that it didn't exist.
  2080.  
  2081. =item Not a GLOB reference
  2082.  
  2083. (F) Perl was trying to evaluate a reference to a "typeglob" (that is,
  2084. a symbol table entry that looks like C<*foo>), but found a reference to
  2085. something else instead.  You can use the ref() function to find out
  2086. what kind of ref it really was.  See L<perlref>.
  2087.  
  2088. =item Not a HASH reference
  2089.  
  2090. (F) Perl was trying to evaluate a reference to a hash value, but
  2091. found a reference to something else instead.  You can use the ref()
  2092. function to find out what kind of ref it really was.  See L<perlref>.
  2093.  
  2094. =item Not a perl script
  2095.  
  2096. (F) The setuid emulator requires that scripts have a well-formed #! line
  2097. even on machines that don't support the #! construct.  The line must
  2098. mention perl.
  2099.  
  2100. =item Not a SCALAR reference
  2101.  
  2102. (F) Perl was trying to evaluate a reference to a scalar value, but
  2103. found a reference to something else instead.  You can use the ref()
  2104. function to find out what kind of ref it really was.  See L<perlref>.
  2105.  
  2106. =item Not a subroutine reference
  2107.  
  2108. (F) Perl was trying to evaluate a reference to a code value (that is, a
  2109. subroutine), but found a reference to something else instead.  You can
  2110. use the ref() function to find out what kind of ref it really was.
  2111. See also L<perlref>.
  2112.  
  2113. =item Not a subroutine reference in overload table
  2114.  
  2115. (F) An attempt was made to specify an entry in an overloading table that
  2116. doesn't somehow point to a valid subroutine.  See L<overload>.
  2117.  
  2118. =item Not an ARRAY reference
  2119.  
  2120. (F) Perl was trying to evaluate a reference to an array value, but
  2121. found a reference to something else instead.  You can use the ref()
  2122. function to find out what kind of ref it really was.  See L<perlref>.
  2123.  
  2124. =item Not enough arguments for %s
  2125.  
  2126. (F) The function requires more arguments than you specified.
  2127.  
  2128. =item Not enough format arguments
  2129.  
  2130. (W) A format specified more picture fields than the next line supplied.
  2131. See L<perlform>.
  2132.  
  2133. =item Null filename used
  2134.  
  2135. (F) You can't require the null filename, especially because on many machines
  2136. that means the current directory!  See L<perlfunc/require>.
  2137.  
  2138. =item Null picture in formline
  2139.  
  2140. (F) The first argument to formline must be a valid format picture
  2141. specification.  It was found to be empty, which probably means you
  2142. supplied it an uninitialized value.  See L<perlform>.
  2143.  
  2144. =item NULL OP IN RUN
  2145.  
  2146. (P) Some internal routine called run() with a null opcode pointer.
  2147.  
  2148. =item Null realloc
  2149.  
  2150. (P) An attempt was made to realloc NULL.
  2151.  
  2152. =item NULL regexp argument
  2153.  
  2154. (P) The internal pattern matching routines blew it big time.
  2155.  
  2156. =item NULL regexp parameter
  2157.  
  2158. (P) The internal pattern matching routines are out of their gourd.
  2159.  
  2160. =item Number too long
  2161.  
  2162. (F) Perl limits the representation of decimal numbers in programs to about
  2163. about 250 characters.  You've exceeded that length.  Future versions of
  2164. Perl are likely to eliminate this arbitrary limitation.  In the meantime,
  2165. try using scientific notation (e.g. "1e6" instead of "1_000_000").
  2166.  
  2167. =item Odd number of elements in hash list
  2168.  
  2169. (S) You specified an odd number of elements to a hash list, which is odd,
  2170. because hash lists come in key/value pairs.
  2171.  
  2172. =item Offset outside string
  2173.  
  2174. (F) You tried to do a read/write/send/recv operation with an offset
  2175. pointing outside the buffer.  This is difficult to imagine.
  2176. The sole exception to this is that C<sysread()>ing past the buffer
  2177. will extend the buffer and zero pad the new area.
  2178.  
  2179. =item oops: oopsAV
  2180.  
  2181. (S) An internal warning that the grammar is screwed up.
  2182.  
  2183. =item oops: oopsHV
  2184.  
  2185. (S) An internal warning that the grammar is screwed up.
  2186.  
  2187. =item Operation `%s': no method found,%s
  2188.  
  2189. (F) An attempt was made to perform an overloaded operation for which
  2190. no handler was defined.  While some handlers can be autogenerated in
  2191. terms of other handlers, there is no default handler for any
  2192. operation, unless C<fallback> overloading key is specified to be
  2193. true.  See L<overload>.
  2194.  
  2195. =item Operator or semicolon missing before %s
  2196.  
  2197. (S) You used a variable or subroutine call where the parser was
  2198. expecting an operator.  The parser has assumed you really meant
  2199. to use an operator, but this is highly likely to be incorrect.
  2200. For example, if you say "*foo *foo" it will be interpreted as
  2201. if you said "*foo * 'foo'".
  2202.  
  2203. =item Out of memory for yacc stack
  2204.  
  2205. (F) The yacc parser wanted to grow its stack so it could continue parsing,
  2206. but realloc() wouldn't give it more memory, virtual or otherwise.
  2207.  
  2208. =item Out of memory!
  2209.  
  2210. (X|F) The malloc() function returned 0, indicating there was insufficient
  2211. remaining memory (or virtual memory) to satisfy the request.
  2212.  
  2213. The request was judged to be small, so the possibility to trap it
  2214. depends on the way perl was compiled.  By default it is not trappable.
  2215. However, if compiled for this, Perl may use the contents of C<$^M> as
  2216. an emergency pool after die()ing with this message.  In this case the
  2217. error is trappable I<once>.
  2218.  
  2219. =item Out of memory during request for %s
  2220.  
  2221. (F) The malloc() function returned 0, indicating there was insufficient
  2222. remaining memory (or virtual memory) to satisfy the request. However,
  2223. the request was judged large enough (compile-time default is 64K), so
  2224. a possibility to shut down by trapping this error is granted.
  2225.  
  2226. =item page overflow
  2227.  
  2228. (W) A single call to write() produced more lines than can fit on a page.
  2229. See L<perlform>.
  2230.  
  2231. =item panic: ck_grep
  2232.  
  2233. (P) Failed an internal consistency check trying to compile a grep.
  2234.  
  2235. =item panic: ck_split
  2236.  
  2237. (P) Failed an internal consistency check trying to compile a split.
  2238.  
  2239. =item panic: corrupt saved stack index
  2240.  
  2241. (P) The savestack was requested to restore more localized values than there
  2242. are in the savestack.
  2243.  
  2244. =item panic: die %s
  2245.  
  2246. (P) We popped the context stack to an eval context, and then discovered
  2247. it wasn't an eval context.
  2248.  
  2249. =item panic: do_match
  2250.  
  2251. (P) The internal pp_match() routine was called with invalid operational data.
  2252.  
  2253. =item panic: do_split
  2254.  
  2255. (P) Something terrible went wrong in setting up for the split.
  2256.  
  2257. =item panic: do_subst
  2258.  
  2259. (P) The internal pp_subst() routine was called with invalid operational data.
  2260.  
  2261. =item panic: do_trans
  2262.  
  2263. (P) The internal do_trans() routine was called with invalid operational data.
  2264.  
  2265. =item panic: frexp
  2266.  
  2267. (P) The library function frexp() failed, making printf("%f") impossible.
  2268.  
  2269. =item panic: goto
  2270.  
  2271. (P) We popped the context stack to a context with the specified label,
  2272. and then discovered it wasn't a context we know how to do a goto in.
  2273.  
  2274. =item panic: INTERPCASEMOD
  2275.  
  2276. (P) The lexer got into a bad state at a case modifier.
  2277.  
  2278. =item panic: INTERPCONCAT
  2279.  
  2280. (P) The lexer got into a bad state parsing a string with brackets.
  2281.  
  2282. =item panic: last
  2283.  
  2284. (P) We popped the context stack to a block context, and then discovered
  2285. it wasn't a block context.
  2286.  
  2287. =item panic: leave_scope clearsv
  2288.  
  2289. (P) A writable lexical variable became read-only somehow within the scope.
  2290.  
  2291. =item panic: leave_scope inconsistency
  2292.  
  2293. (P) The savestack probably got out of sync.  At least, there was an
  2294. invalid enum on the top of it.
  2295.  
  2296. =item panic: malloc
  2297.  
  2298. (P) Something requested a negative number of bytes of malloc.
  2299.  
  2300. =item panic: mapstart
  2301.  
  2302. (P) The compiler is screwed up with respect to the map() function.
  2303.  
  2304. =item panic: null array
  2305.  
  2306. (P) One of the internal array routines was passed a null AV pointer.
  2307.  
  2308. =item panic: pad_alloc
  2309.  
  2310. (P) The compiler got confused about which scratch pad it was allocating
  2311. and freeing temporaries and lexicals from.
  2312.  
  2313. =item panic: pad_free curpad
  2314.  
  2315. (P) The compiler got confused about which scratch pad it was allocating
  2316. and freeing temporaries and lexicals from.
  2317.  
  2318. =item panic: pad_free po
  2319.  
  2320. (P) An invalid scratch pad offset was detected internally.
  2321.  
  2322. =item panic: pad_reset curpad
  2323.  
  2324. (P) The compiler got confused about which scratch pad it was allocating
  2325. and freeing temporaries and lexicals from.
  2326.  
  2327. =item panic: pad_sv po
  2328.  
  2329. (P) An invalid scratch pad offset was detected internally.
  2330.  
  2331. =item panic: pad_swipe curpad
  2332.  
  2333. (P) The compiler got confused about which scratch pad it was allocating
  2334. and freeing temporaries and lexicals from.
  2335.  
  2336. =item panic: pad_swipe po
  2337.  
  2338. (P) An invalid scratch pad offset was detected internally.
  2339.  
  2340. =item panic: pp_iter
  2341.  
  2342. (P) The foreach iterator got called in a non-loop context frame.
  2343.  
  2344. =item panic: realloc
  2345.  
  2346. (P) Something requested a negative number of bytes of realloc.
  2347.  
  2348. =item panic: restartop
  2349.  
  2350. (P) Some internal routine requested a goto (or something like it), and
  2351. didn't supply the destination.
  2352.  
  2353. =item panic: return
  2354.  
  2355. (P) We popped the context stack to a subroutine or eval context, and
  2356. then discovered it wasn't a subroutine or eval context.
  2357.  
  2358. =item panic: scan_num
  2359.  
  2360. (P) scan_num() got called on something that wasn't a number.
  2361.  
  2362. =item panic: sv_insert
  2363.  
  2364. (P) The sv_insert() routine was told to remove more string than there
  2365. was string.
  2366.  
  2367. =item panic: top_env
  2368.  
  2369. (P) The compiler attempted to do a goto, or something weird like that.
  2370.  
  2371. =item panic: yylex
  2372.  
  2373. (P) The lexer got into a bad state while processing a case modifier.
  2374.  
  2375. =item Pareneses missing around "%s" list
  2376.  
  2377. (W) You said something like
  2378.  
  2379.     my $foo, $bar = @_;
  2380.  
  2381. when you meant
  2382.  
  2383.     my ($foo, $bar) = @_;
  2384.  
  2385. Remember that "my" and "local" bind closer than comma.
  2386.  
  2387. =item Perl %3.3f required--this is only version %s, stopped
  2388.  
  2389. (F) The module in question uses features of a version of Perl more recent
  2390. than the currently running version.  How long has it been since you upgraded,
  2391. anyway?  See L<perlfunc/require>.
  2392.  
  2393. =item Permission denied
  2394.  
  2395. (F) The setuid emulator in suidperl decided you were up to no good.
  2396.  
  2397. =item pid %d not a child
  2398.  
  2399. (W) A warning peculiar to VMS.  Waitpid() was asked to wait for a process which
  2400. isn't a subprocess of the current process.  While this is fine from VMS'
  2401. perspective, it's probably not what you intended.
  2402.  
  2403. =item POSIX getpgrp can't take an argument
  2404.  
  2405. (F) Your C compiler uses POSIX getpgrp(), which takes no argument, unlike
  2406. the BSD version, which takes a pid.
  2407.  
  2408. =item Possible attempt to put comments in qw() list
  2409.  
  2410. (W) qw() lists contain items separated by whitespace; as with literal
  2411. strings, comment characters are not ignored, but are instead treated
  2412. as literal data.  (You may have used different delimiters than the
  2413. exclamation marks parentheses shown here; braces are also frequently
  2414. used.)
  2415.  
  2416. You probably wrote something like this:
  2417.  
  2418.     @list = qw(
  2419.     a # a comment
  2420.         b # another comment
  2421.     );
  2422.  
  2423. when you should have written this:
  2424.  
  2425.     @list = qw(
  2426.     a
  2427.         b
  2428.     );
  2429.  
  2430. If you really want comments, build your list the
  2431. old-fashioned way, with quotes and commas:
  2432.  
  2433.     @list = (
  2434.         'a',    # a comment
  2435.         'b',    # another comment
  2436.     );
  2437.  
  2438. =item Possible attempt to separate words with commas
  2439.  
  2440. (W) qw() lists contain items separated by whitespace; therefore commas
  2441. aren't needed to separate the items.  (You may have used different
  2442. delimiters than the parentheses shown here; braces are also frequently
  2443. used.)
  2444.  
  2445. You probably wrote something like this:
  2446.  
  2447.     qw! a, b, c !;
  2448.  
  2449. which puts literal commas into some of the list items.  Write it without
  2450. commas if you don't want them to appear in your data:
  2451.  
  2452.     qw! a b c !;
  2453.  
  2454. =item Possible memory corruption: %s overflowed 3rd argument
  2455.  
  2456. (F) An ioctl() or fcntl() returned more than Perl was bargaining for.
  2457. Perl guesses a reasonable buffer size, but puts a sentinel byte at the
  2458. end of the buffer just in case.  This sentinel byte got clobbered, and
  2459. Perl assumes that memory is now corrupted.  See L<perlfunc/ioctl>.
  2460.  
  2461. =item Precedence problem: open %s should be open(%s)
  2462.  
  2463. (S) The old irregular construct
  2464.  
  2465.     open FOO || die;
  2466.  
  2467. is now misinterpreted as
  2468.  
  2469.     open(FOO || die);
  2470.  
  2471. because of the strict regularization of Perl 5's grammar into unary
  2472. and list operators.  (The old open was a little of both.)  You must
  2473. put parentheses around the filehandle, or use the new "or" operator
  2474. instead of "||".
  2475.  
  2476. =item print on closed filehandle %s
  2477.  
  2478. (W) The filehandle you're printing on got itself closed sometime before now.
  2479. Check your logic flow.
  2480.  
  2481. =item printf on closed filehandle %s
  2482.  
  2483. (W) The filehandle you're writing to got itself closed sometime before now.
  2484. Check your logic flow.
  2485.  
  2486. =item Probable precedence problem on %s
  2487.  
  2488. (W) The compiler found a bareword where it expected a conditional,
  2489. which often indicates that an || or && was parsed as part of the
  2490. last argument of the previous construct, for example:
  2491.  
  2492.     open FOO || die;
  2493.  
  2494. =item Prototype mismatch: %s vs %s
  2495.  
  2496. (S) The subroutine being declared or defined had previously been declared
  2497. or defined with a different function prototype.
  2498.  
  2499. =item Read on closed filehandle E<lt>%sE<gt>
  2500.  
  2501. (W) The filehandle you're reading from got itself closed sometime before now.
  2502. Check your logic flow.
  2503.  
  2504. =item Reallocation too large: %lx
  2505.  
  2506. (F) You can't allocate more than 64K on an MS-DOS machine.
  2507.  
  2508. =item Recompile perl with B<-D>DEBUGGING to use B<-D> switch
  2509.  
  2510. (F) You can't use the B<-D> option unless the code to produce the
  2511. desired output is compiled into Perl, which entails some overhead,
  2512. which is why it's currently left out of your copy.
  2513.  
  2514. =item Recursive inheritance detected
  2515.  
  2516. (F) More than 100 levels of inheritance were used.  Probably indicates
  2517. an unintended loop in your inheritance hierarchy.
  2518.  
  2519. =item Reference miscount in sv_replace()
  2520.  
  2521. (W) The internal sv_replace() function was handed a new SV with a
  2522. reference count of other than 1.
  2523.  
  2524. =item regexp memory corruption
  2525.  
  2526. (P) The regular expression engine got confused by what the regular
  2527. expression compiler gave it.
  2528.  
  2529. =item regexp out of space
  2530.  
  2531. (P) A "can't happen" error, because safemalloc() should have caught it earlier.
  2532.  
  2533. =item regexp too big
  2534.  
  2535. (F) The current implementation of regular expressions uses shorts as
  2536. address offsets within a string.  Unfortunately this means that if
  2537. the regular expression compiles to longer than 32767, it'll blow up.
  2538. Usually when you want a regular expression this big, there is a better
  2539. way to do it with multiple statements.  See L<perlre>.
  2540.  
  2541. =item Reversed %s= operator
  2542.  
  2543. (W) You wrote your assignment operator backwards.  The = must always
  2544. comes last, to avoid ambiguity with subsequent unary operators.
  2545.  
  2546. =item Runaway format
  2547.  
  2548. (F) Your format contained the ~~ repeat-until-blank sequence, but it
  2549. produced 200 lines at once, and the 200th line looked exactly like the
  2550. 199th line.  Apparently you didn't arrange for the arguments to exhaust
  2551. themselves, either by using ^ instead of @ (for scalar variables), or by
  2552. shifting or popping (for array variables).  See L<perlform>.
  2553.  
  2554. =item Scalar value @%s[%s] better written as $%s[%s]
  2555.  
  2556. (W) You've used an array slice (indicated by @) to select a single element of
  2557. an array.  Generally it's better to ask for a scalar value (indicated by $).
  2558. The difference is that C<$foo[&bar]> always behaves like a scalar, both when
  2559. assigning to it and when evaluating its argument, while C<@foo[&bar]> behaves
  2560. like a list when you assign to it, and provides a list context to its
  2561. subscript, which can do weird things if you're expecting only one subscript.
  2562.  
  2563. On the other hand, if you were actually hoping to treat the array
  2564. element as a list, you need to look into how references work, because
  2565. Perl will not magically convert between scalars and lists for you.  See
  2566. L<perlref>.
  2567.  
  2568. =item Scalar value @%s{%s} better written as $%s{%s}
  2569.  
  2570. (W) You've used a hash slice (indicated by @) to select a single element of
  2571. a hash.  Generally it's better to ask for a scalar value (indicated by $).
  2572. The difference is that C<$foo{&bar}> always behaves like a scalar, both when
  2573. assigning to it and when evaluating its argument, while C<@foo{&bar}> behaves
  2574. like a list when you assign to it, and provides a list context to its
  2575. subscript, which can do weird things if you're expecting only one subscript.
  2576.  
  2577. On the other hand, if you were actually hoping to treat the hash
  2578. element as a list, you need to look into how references work, because
  2579. Perl will not magically convert between scalars and lists for you.  See
  2580. L<perlref>.
  2581.  
  2582. =item Script is not setuid/setgid in suidperl
  2583.  
  2584. (F) Oddly, the suidperl program was invoked on a script without a setuid
  2585. or setgid bit set.  This doesn't make much sense.
  2586.  
  2587. =item Search pattern not terminated
  2588.  
  2589. (F) The lexer couldn't find the final delimiter of a // or m{}
  2590. construct.  Remember that bracketing delimiters count nesting level.
  2591.  
  2592. =item %sseek() on unopened file
  2593.  
  2594. (W) You tried to use the seek() or sysseek() function on a filehandle that
  2595. was either never opened or has since been closed.
  2596.  
  2597. =item select not implemented
  2598.  
  2599. (F) This machine doesn't implement the select() system call.
  2600.  
  2601. =item sem%s not implemented
  2602.  
  2603. (F) You don't have System V semaphore IPC on your system.
  2604.  
  2605. =item semi-panic: attempt to dup freed string
  2606.  
  2607. (S) The internal newSVsv() routine was called to duplicate a scalar
  2608. that had previously been marked as free.
  2609.  
  2610. =item Semicolon seems to be missing
  2611.  
  2612. (W) A nearby syntax error was probably caused by a missing semicolon,
  2613. or possibly some other missing operator, such as a comma.
  2614.  
  2615. =item Send on closed socket
  2616.  
  2617. (W) The filehandle you're sending to got itself closed sometime before now.
  2618. Check your logic flow.
  2619.  
  2620. =item Sequence (?#... not terminated
  2621.  
  2622. (F) A regular expression comment must be terminated by a closing
  2623. parenthesis.  Embedded parentheses aren't allowed.  See L<perlre>.
  2624.  
  2625. =item Sequence (?%s...) not implemented
  2626.  
  2627. (F) A proposed regular expression extension has the character reserved
  2628. but has not yet been written.  See L<perlre>.
  2629.  
  2630. =item Sequence (?%s...) not recognized
  2631.  
  2632. (F) You used a regular expression extension that doesn't make sense.
  2633. See L<perlre>.
  2634.  
  2635. =item Server error
  2636.  
  2637. Also known as "500 Server error".
  2638.  
  2639. B<This is a CGI error, not a Perl error>.
  2640.  
  2641. You need to make sure your script is executable, is accessible by the user
  2642. CGI is running the script under (which is probably not the user account you
  2643. tested it under), does not rely on any environment variables (like PATH)
  2644. from the user it isn't running under, and isn't in a location where the CGI
  2645. server can't find it, basically, more or less.  Please see the following
  2646. for more information:
  2647.  
  2648.     http://www.perl.com/perl/faq/idiots-guide.html
  2649.     http://www.perl.com/perl/faq/perl-cgi-faq.html
  2650.     ftp://rtfm.mit.edu/pub/usenet/news.answers/www/cgi-faq
  2651.     http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
  2652.     http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
  2653.  
  2654. =item setegid() not implemented
  2655.  
  2656. (F) You tried to assign to C<$)>, and your operating system doesn't support
  2657. the setegid() system call (or equivalent), or at least Configure didn't
  2658. think so.
  2659.  
  2660. =item seteuid() not implemented
  2661.  
  2662. (F) You tried to assign to C<$E<gt>>, and your operating system doesn't support
  2663. the seteuid() system call (or equivalent), or at least Configure didn't
  2664. think so.
  2665.  
  2666. =item setrgid() not implemented
  2667.  
  2668. (F) You tried to assign to C<$(>, and your operating system doesn't support
  2669. the setrgid() system call (or equivalent), or at least Configure didn't
  2670. think so.
  2671.  
  2672. =item setruid() not implemented
  2673.  
  2674. (F) You tried to assign to C<$<lt>>, and your operating system doesn't support
  2675. the setruid() system call (or equivalent), or at least Configure didn't
  2676. think so.
  2677.  
  2678. =item Setuid/gid script is writable by world
  2679.  
  2680. (F) The setuid emulator won't run a script that is writable by the world,
  2681. because the world might have written on it already.
  2682.  
  2683. =item shm%s not implemented
  2684.  
  2685. (F) You don't have System V shared memory IPC on your system.
  2686.  
  2687. =item shutdown() on closed fd
  2688.  
  2689. (W) You tried to do a shutdown on a closed socket.  Seems a bit superfluous.
  2690.  
  2691. =item SIG%s handler "%s" not defined
  2692.  
  2693. (W) The signal handler named in %SIG doesn't, in fact, exist.  Perhaps you
  2694. put it into the wrong package?
  2695.  
  2696. =item sort is now a reserved word
  2697.  
  2698. (F) An ancient error message that almost nobody ever runs into anymore.
  2699. But before sort was a keyword, people sometimes used it as a filehandle.
  2700.  
  2701. =item Sort subroutine didn't return a numeric value
  2702.  
  2703. (F) A sort comparison routine must return a number.  You probably blew
  2704. it by not using C<E<lt>=E<gt>> or C<cmp>, or by not using them correctly.
  2705. See L<perlfunc/sort>.
  2706.  
  2707. =item Sort subroutine didn't return single value
  2708.  
  2709. (F) A sort comparison subroutine may not return a list value with more
  2710. or less than one element.  See L<perlfunc/sort>.
  2711.  
  2712. =item Split loop
  2713.  
  2714. (P) The split was looping infinitely.  (Obviously, a split shouldn't iterate
  2715. more times than there are characters of input, which is what happened.)
  2716. See L<perlfunc/split>.
  2717.  
  2718. =item Stat on unopened file E<lt>%sE<gt>
  2719.  
  2720. (W) You tried to use the stat() function (or an equivalent file test)
  2721. on a filehandle that was either never opened or has since been closed.
  2722.  
  2723. =item Statement unlikely to be reached
  2724.  
  2725. (W) You did an exec() with some statement after it other than a die().
  2726. This is almost always an error, because exec() never returns unless
  2727. there was a failure.  You probably wanted to use system() instead,
  2728. which does return.  To suppress this warning, put the exec() in a block
  2729. by itself.
  2730.  
  2731. =item Stub found while resolving method `%s' overloading `%s' in package `%s'
  2732.  
  2733. (P) Overloading resolution over @ISA tree may be broken by importation stubs.
  2734. Stubs should never be implicitely created, but explicit calls to C<can>
  2735. may break this.
  2736.  
  2737. =item Subroutine %s redefined
  2738.  
  2739. (W) You redefined a subroutine.  To suppress this warning, say
  2740.  
  2741.     {
  2742.     local $^W = 0;
  2743.     eval "sub name { ... }";
  2744.     }
  2745.  
  2746. =item Substitution loop
  2747.  
  2748. (P) The substitution was looping infinitely.  (Obviously, a
  2749. substitution shouldn't iterate more times than there are characters of
  2750. input, which is what happened.)  See the discussion of substitution in
  2751. L<perlop/"Quote and Quote-like Operators">.
  2752.  
  2753. =item Substitution pattern not terminated
  2754.  
  2755. (F) The lexer couldn't find the interior delimiter of a s/// or s{}{}
  2756. construct.  Remember that bracketing delimiters count nesting level.
  2757.  
  2758. =item Substitution replacement not terminated
  2759.  
  2760. (F) The lexer couldn't find the final delimiter of a s/// or s{}{}
  2761. construct.  Remember that bracketing delimiters count nesting level.
  2762.  
  2763. =item substr outside of string
  2764.  
  2765. (W) You tried to reference a substr() that pointed outside of a string.
  2766. That is, the absolute value of the offset was larger than the length of
  2767. the string.  See L<perlfunc/substr>.
  2768.  
  2769. =item suidperl is no longer needed since %s
  2770.  
  2771. (F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but a
  2772. version of the setuid emulator somehow got run anyway.
  2773.  
  2774. =item syntax error
  2775.  
  2776. (F) Probably means you had a syntax error.  Common reasons include:
  2777.  
  2778.     A keyword is misspelled.
  2779.     A semicolon is missing.
  2780.     A comma is missing.
  2781.     An opening or closing parenthesis is missing.
  2782.     An opening or closing brace is missing.
  2783.     A closing quote is missing.
  2784.  
  2785. Often there will be another error message associated with the syntax
  2786. error giving more information.  (Sometimes it helps to turn on B<-w>.)
  2787. The error message itself often tells you where it was in the line when
  2788. it decided to give up.  Sometimes the actual error is several tokens
  2789. before this, because Perl is good at understanding random input.
  2790. Occasionally the line number may be misleading, and once in a blue moon
  2791. the only way to figure out what's triggering the error is to call
  2792. C<perl -c> repeatedly, chopping away half the program each time to see
  2793. if the error went away.  Sort of the cybernetic version of S<20 questions>.
  2794.  
  2795. =item syntax error at line %d: `%s' unexpected
  2796.  
  2797. (A) You've accidentally run your script through the Bourne shell
  2798. instead of Perl.  Check the #! line, or manually feed your script
  2799. into Perl yourself.
  2800.  
  2801. =item System V IPC is not implemented on this machine
  2802.  
  2803. (F) You tried to do something with a function beginning with "sem", "shm",
  2804. or "msg".  See L<perlfunc/semctl>, for example.
  2805.  
  2806. =item Syswrite on closed filehandle
  2807.  
  2808. (W) The filehandle you're writing to got itself closed sometime before now.
  2809. Check your logic flow.
  2810.  
  2811. =item Target of goto is too deeply nested
  2812.  
  2813. (F) You tried to use C<goto> to reach a label that was too deeply
  2814. nested for Perl to reach.  Perl is doing you a favor by refusing.
  2815.  
  2816. =item tell() on unopened file
  2817.  
  2818. (W) You tried to use the tell() function on a filehandle that was either
  2819. never opened or has since been closed.
  2820.  
  2821. =item Test on unopened file E<lt>%sE<gt>
  2822.  
  2823. (W) You tried to invoke a file test operator on a filehandle that isn't
  2824. open.  Check your logic.  See also L<perlfunc/-X>.
  2825.  
  2826. =item That use of $[ is unsupported
  2827.  
  2828. (F) Assignment to C<$[> is now strictly circumscribed, and interpreted as
  2829. a compiler directive.  You may say only one of
  2830.  
  2831.     $[ = 0;
  2832.     $[ = 1;
  2833.     ...
  2834.     local $[ = 0;
  2835.     local $[ = 1;
  2836.     ...
  2837.  
  2838. This is to prevent the problem of one module changing the array base
  2839. out from under another module inadvertently.  See L<perlvar/$[>.
  2840.  
  2841. =item The %s function is unimplemented
  2842.  
  2843. The function indicated isn't implemented on this architecture, according
  2844. to the probings of Configure.
  2845.  
  2846. =item The crypt() function is unimplemented due to excessive paranoia
  2847.  
  2848. (F) Configure couldn't find the crypt() function on your machine,
  2849. probably because your vendor didn't supply it, probably because they
  2850. think the U.S. Government thinks it's a secret, or at least that they
  2851. will continue to pretend that it is.  And if you quote me on that, I
  2852. will deny it.
  2853.  
  2854. =item The stat preceding C<-l _> wasn't an lstat
  2855.  
  2856. (F) It makes no sense to test the current stat buffer for symbolic linkhood
  2857. if the last stat that wrote to the stat buffer already went past
  2858. the symlink to get to the real file.  Use an actual filename instead.
  2859.  
  2860. =item times not implemented
  2861.  
  2862. (F) Your version of the C library apparently doesn't do times().  I suspect
  2863. you're not running on Unix.
  2864.  
  2865. =item Too few args to syscall
  2866.  
  2867. (F) There has to be at least one argument to syscall() to specify the
  2868. system call to call, silly dilly.
  2869.  
  2870. =item Too late for "B<-T>" option
  2871.  
  2872. (X) The #! line (or local equivalent) in a Perl script contains the
  2873. B<-T> option, but Perl was not invoked with B<-T> in its command line.
  2874. This is an error because, by the time Perl discovers a B<-T> in a
  2875. script, it's too late to properly taint everything from the environment.
  2876. So Perl gives up.
  2877.  
  2878. If the Perl script is being executed as a command using the #!
  2879. mechanism (or its local equivalent), this error can usually be fixed
  2880. by editing the #! line so that the B<-T> option is a part of Perl's
  2881. first argument: e.g. change C<perl -n -T> to C<perl -T -n>.
  2882.  
  2883. If the Perl script is being executed as C<perl scriptname>, then the
  2884. B<-T> option must appear on the command line: C<perl -T scriptname>.
  2885.  
  2886. =item Too late for "-%s" option
  2887.  
  2888. (X) The #! line (or local equivalent) in a Perl script contains the
  2889. B<-M> or B<-m> option.  This is an error because B<-M> and B<-m> options
  2890. are not intended for use inside scripts.  Use the C<use> pragma instead.
  2891.  
  2892. =item Too many ('s
  2893.  
  2894. =item Too many )'s
  2895.  
  2896. (A) You've accidentally run your script through B<csh> instead
  2897. of Perl.  Check the #! line, or manually feed your script into
  2898. Perl yourself.
  2899.  
  2900. =item Too many args to syscall
  2901.  
  2902. (F) Perl supports a maximum of only 14 args to syscall().
  2903.  
  2904. =item Too many arguments for %s
  2905.  
  2906. (F) The function requires fewer arguments than you specified.
  2907.  
  2908. =item trailing \ in regexp
  2909.  
  2910. (F) The regular expression ends with an unbackslashed backslash.  Backslash
  2911. it.   See L<perlre>.
  2912.  
  2913. =item Translation pattern not terminated
  2914.  
  2915. (F) The lexer couldn't find the interior delimiter of a tr/// or tr[][]
  2916. construct.
  2917.  
  2918. =item Translation replacement not terminated
  2919.  
  2920. (F) The lexer couldn't find the final delimiter of a tr/// or tr[][]
  2921. construct.
  2922.  
  2923. =item truncate not implemented
  2924.  
  2925. (F) Your machine doesn't implement a file truncation mechanism that
  2926. Configure knows about.
  2927.  
  2928. =item Type of arg %d to %s must be %s (not %s)
  2929.  
  2930. (F) This function requires the argument in that position to be of a
  2931. certain type.  Arrays must be @NAME or C<@{EXPR}>.  Hashes must be
  2932. %NAME or C<%{EXPR}>.  No implicit dereferencing is allowed--use the
  2933. {EXPR} forms as an explicit dereference.  See L<perlref>.
  2934.  
  2935. =item umask: argument is missing initial 0
  2936.  
  2937. (W) A umask of 222 is incorrect.  It should be 0222, because octal literals
  2938. always start with 0 in Perl, as in C.
  2939.  
  2940. =item Unable to create sub named "%s"
  2941.  
  2942. (F) You attempted to create or access a subroutine with an illegal name.
  2943.  
  2944. =item Unbalanced context: %d more PUSHes than POPs
  2945.  
  2946. (W) The exit code detected an internal inconsistency in how many execution
  2947. contexts were entered and left.
  2948.  
  2949. =item Unbalanced saves: %d more saves than restores
  2950.  
  2951. (W) The exit code detected an internal inconsistency in how many
  2952. values were temporarily localized.
  2953.  
  2954. =item Unbalanced scopes: %d more ENTERs than LEAVEs
  2955.  
  2956. (W) The exit code detected an internal inconsistency in how many blocks
  2957. were entered and left.
  2958.  
  2959. =item Unbalanced tmps: %d more allocs than frees
  2960.  
  2961. (W) The exit code detected an internal inconsistency in how many mortal
  2962. scalars were allocated and freed.
  2963.  
  2964. =item Undefined format "%s" called
  2965.  
  2966. (F) The format indicated doesn't seem to exist.  Perhaps it's really in
  2967. another package?  See L<perlform>.
  2968.  
  2969. =item Undefined sort subroutine "%s" called
  2970.  
  2971. (F) The sort comparison routine specified doesn't seem to exist.  Perhaps
  2972. it's in a different package?  See L<perlfunc/sort>.
  2973.  
  2974. =item Undefined subroutine &%s called
  2975.  
  2976. (F) The subroutine indicated hasn't been defined, or if it was, it
  2977. has since been undefined.
  2978.  
  2979. =item Undefined subroutine called
  2980.  
  2981. (F) The anonymous subroutine you're trying to call hasn't been defined,
  2982. or if it was, it has since been undefined.
  2983.  
  2984. =item Undefined subroutine in sort
  2985.  
  2986. (F) The sort comparison routine specified is declared but doesn't seem to
  2987. have been defined yet.  See L<perlfunc/sort>.
  2988.  
  2989. =item Undefined top format "%s" called
  2990.  
  2991. (F) The format indicated doesn't seem to exist.  Perhaps it's really in
  2992. another package?  See L<perlform>.
  2993.  
  2994. =item unexec of %s into %s failed!
  2995.  
  2996. (F) The unexec() routine failed for some reason.  See your local FSF
  2997. representative, who probably put it there in the first place.
  2998.  
  2999. =item Unknown BYTEORDER
  3000.  
  3001. (F) There are no byte-swapping functions for a machine with this byte order.
  3002.  
  3003. =item unmatched () in regexp
  3004.  
  3005. (F) Unbackslashed parentheses must always be balanced in regular
  3006. expressions.  If you're a vi user, the % key is valuable for finding
  3007. the matching parenthesis.  See L<perlre>.
  3008.  
  3009. =item Unmatched right bracket
  3010.  
  3011. (F) The lexer counted more closing curly brackets (braces) than opening
  3012. ones, so you're probably missing an opening bracket.  As a general
  3013. rule, you'll find the missing one (so to speak) near the place you were
  3014. last editing.
  3015.  
  3016. =item unmatched [] in regexp
  3017.  
  3018. (F) The brackets around a character class must match.  If you wish to
  3019. include a closing bracket in a character class, backslash it or put it first.
  3020. See L<perlre>.
  3021.  
  3022. =item Unquoted string "%s" may clash with future reserved word
  3023.  
  3024. (W) You used a bareword that might someday be claimed as a reserved word.
  3025. It's best to put such a word in quotes, or capitalize it somehow, or insert
  3026. an underbar into it.  You might also declare it as a subroutine.
  3027.  
  3028. =item Unrecognized character %s
  3029.  
  3030. (F) The Perl parser has no idea what to do with the specified character
  3031. in your Perl script (or eval).  Perhaps you tried to run a compressed
  3032. script, a binary program, or a directory as a Perl program.
  3033.  
  3034. =item Unrecognized signal name "%s"
  3035.  
  3036. (F) You specified a signal name to the kill() function that was not recognized.
  3037. Say C<kill -l> in your shell to see the valid signal names on your system.
  3038.  
  3039. =item Unrecognized switch: -%s
  3040.  
  3041. (F) You specified an illegal option to Perl.  Don't do that.
  3042. (If you think you didn't do that, check the #! line to see if it's
  3043. supplying the bad switch on your behalf.)
  3044.  
  3045. =item Unsuccessful %s on filename containing newline
  3046.  
  3047. (W) A file operation was attempted on a filename, and that operation
  3048. failed, PROBABLY because the filename contained a newline, PROBABLY
  3049. because you forgot to chop() or chomp() it off.  See L<perlfunc/chomp>.
  3050.  
  3051. =item Unsupported directory function "%s" called
  3052.  
  3053. (F) Your machine doesn't support opendir() and readdir().
  3054.  
  3055. =item Unsupported function fork
  3056.  
  3057. (F) Your version of executable does not support forking.
  3058.  
  3059. Note that under some systems, like OS/2, there may be different flavors of
  3060. Perl executables, some of which may support fork, some not. Try changing
  3061. the name you call Perl by to C<perl_>, C<perl__>, and so on.
  3062.  
  3063. =item Unsupported function %s
  3064.  
  3065. (F) This machines doesn't implement the indicated function, apparently.
  3066. At least, Configure doesn't think so.
  3067.  
  3068. =item Unsupported socket function "%s" called
  3069.  
  3070. (F) Your machine doesn't support the Berkeley socket mechanism, or at
  3071. least that's what Configure thought.
  3072.  
  3073. =item Unterminated E<lt>E<gt> operator
  3074.  
  3075. (F) The lexer saw a left angle bracket in a place where it was expecting
  3076. a term, so it's looking for the corresponding right angle bracket, and not
  3077. finding it.  Chances are you left some needed parentheses out earlier in
  3078. the line, and you really meant a "less than".
  3079.  
  3080. =item Use of "$$<digit>" to mean "${$}<digit>" is deprecated
  3081.  
  3082. (D) Perl versions before 5.004 misinterpreted any type marker followed
  3083. by "$" and a digit.  For example, "$$0" was incorrectly taken to mean
  3084. "${$}0" instead of "${$0}".  This bug is (mostly) fixed in Perl 5.004.
  3085.  
  3086. However, the developers of Perl 5.004 could not fix this bug completely,
  3087. because at least two widely-used modules depend on the old meaning of
  3088. "$$0" in a string.  So Perl 5.004 still interprets "$$<digit>" in the
  3089. old (broken) way inside strings; but it generates this message as a
  3090. warning.  And in Perl 5.005, this special treatment will cease.
  3091.  
  3092. =item Use of $# is deprecated
  3093.  
  3094. (D) This was an ill-advised attempt to emulate a poorly defined B<awk> feature.
  3095. Use an explicit printf() or sprintf() instead.
  3096.  
  3097. =item Use of $* is deprecated
  3098.  
  3099. (D) This variable magically turned on multi-line pattern matching, both for
  3100. you and for any luckless subroutine that you happen to call.  You should
  3101. use the new C<//m> and C<//s> modifiers now to do that without the dangerous
  3102. action-at-a-distance effects of C<$*>.
  3103.  
  3104. =item Use of %s in printf format not supported
  3105.  
  3106. (F) You attempted to use a feature of printf that is accessible from
  3107. only C.  This usually means there's a better way to do it in Perl.
  3108.  
  3109. =item Use of bare E<lt>E<lt> to mean E<lt>E<lt>"" is deprecated
  3110.  
  3111. (D) You are now encouraged to use the explicitly quoted form if you
  3112. wish to use an empty line as the terminator of the here-document.
  3113.  
  3114. =item Use of implicit split to @_ is deprecated
  3115.  
  3116. (D) It makes a lot of work for the compiler when you clobber a
  3117. subroutine's argument list, so it's better if you assign the results of
  3118. a split() explicitly to an array (or list).
  3119.  
  3120. =item Use of inherited AUTOLOAD for non-method %s() is deprecated
  3121.  
  3122. (D) As an (ahem) accidental feature, C<AUTOLOAD> subroutines are looked
  3123. up as methods (using the C<@ISA> hierarchy) even when the subroutines to
  3124. be autoloaded were called as plain functions (e.g. C<Foo::bar()>), not
  3125. as methods (e.g. C<Foo->bar()> or C<$obj->bar()>).
  3126.  
  3127. This bug will be rectified in Perl 5.005, which will use method lookup
  3128. only for methods' C<AUTOLOAD>s.  However, there is a significant base
  3129. of existing code that may be using the old behavior.  So, as an
  3130. interim step, Perl 5.004 issues an optional warning when non-methods
  3131. use inherited C<AUTOLOAD>s.
  3132.  
  3133. The simple rule is:  Inheritance will not work when autoloading
  3134. non-methods.  The simple fix for old code is:  In any module that used to
  3135. depend on inheriting C<AUTOLOAD> for non-methods from a base class named
  3136. C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during startup.
  3137.  
  3138. =item Use of %s is deprecated
  3139.  
  3140. (D) The construct indicated is no longer recommended for use, generally
  3141. because there's a better way to do it, and also because the old way has
  3142. bad side effects.
  3143.  
  3144. =item Use of uninitialized value
  3145.  
  3146. (W) An undefined value was used as if it were already defined.  It was
  3147. interpreted as a "" or a 0, but maybe it was a mistake.  To suppress this
  3148. warning assign an initial value to your variables.
  3149.  
  3150. =item Useless use of %s in void context
  3151.  
  3152. (W) You did something without a side effect in a context that does nothing
  3153. with the return value, such as a statement that doesn't return a value
  3154. from a block, or the left side of a scalar comma operator.  Very often
  3155. this points not to stupidity on your part, but a failure of Perl to parse
  3156. your program the way you thought it would.  For example, you'd get this
  3157. if you mixed up your C precedence with Python precedence and said
  3158.  
  3159.     $one, $two = 1, 2;
  3160.  
  3161. when you meant to say
  3162.  
  3163.     ($one, $two) = (1, 2);
  3164.  
  3165. Another common error is to use ordinary parentheses to construct a list
  3166. reference when you should be using square or curly brackets, for
  3167. example, if you say
  3168.  
  3169.     $array = (1,2);
  3170.  
  3171. when you should have said
  3172.  
  3173.     $array = [1,2];
  3174.  
  3175. The square brackets explicitly turn a list value into a scalar value,
  3176. while parentheses do not.  So when a parenthesized list is evaluated in
  3177. a scalar context, the comma is treated like C's comma operator, which
  3178. throws away the left argument, which is not what you want.  See
  3179. L<perlref> for more on this.
  3180.  
  3181. =item untie attempted while %d inner references still exist
  3182.  
  3183. (W) A copy of the object returned from C<tie> (or C<tied>) was still
  3184. valid when C<untie> was called.
  3185.  
  3186. =item Value of %s can be "0"; test with defined()
  3187.  
  3188. (W) In a conditional expression, you used <HANDLE>, <*> (glob), C<each()>,
  3189. or C<readdir()> as a boolean value.  Each of these constructs can return a
  3190. value of "0"; that would make the conditional expression false, which is
  3191. probably not what you intended.  When using these constructs in conditional
  3192. expressions, test their values with the C<defined> operator.
  3193.  
  3194. =item Variable "%s" is not imported%s
  3195.  
  3196. (F) While "use strict" in effect, you referred to a global variable
  3197. that you apparently thought was imported from another module, because
  3198. something else of the same name (usually a subroutine) is exported
  3199. by that module.  It usually means you put the wrong funny character
  3200. on the front of your variable.
  3201.  
  3202. =item Variable "%s" may be unavailable
  3203.  
  3204. (W) An inner (nested) I<anonymous> subroutine is inside a I<named>
  3205. subroutine, and outside that is another subroutine; and the anonymous
  3206. (innermost) subroutine is referencing a lexical variable defined in
  3207. the outermost subroutine.  For example:
  3208.  
  3209.    sub outermost { my $a; sub middle { sub { $a } } }
  3210.  
  3211. If the anonymous subroutine is called or referenced (directly or
  3212. indirectly) from the outermost subroutine, it will share the variable
  3213. as you would expect.  But if the anonymous subroutine is called or
  3214. referenced when the outermost subroutine is not active, it will see
  3215. the value of the shared variable as it was before and during the
  3216. *first* call to the outermost subroutine, which is probably not what
  3217. you want.
  3218.  
  3219. In these circumstances, it is usually best to make the middle
  3220. subroutine anonymous, using the C<sub {}> syntax.  Perl has specific
  3221. support for shared variables in nested anonymous subroutines; a named
  3222. subroutine in between interferes with this feature.
  3223.  
  3224. =item Variable "%s" will not stay shared
  3225.  
  3226. (W) An inner (nested) I<named> subroutine is referencing a lexical
  3227. variable defined in an outer subroutine.
  3228.  
  3229. When the inner subroutine is called, it will probably see the value of
  3230. the outer subroutine's variable as it was before and during the
  3231. *first* call to the outer subroutine; in this case, after the first
  3232. call to the outer subroutine is complete, the inner and outer
  3233. subroutines will no longer share a common value for the variable.  In
  3234. other words, the variable will no longer be shared.
  3235.  
  3236. Furthermore, if the outer subroutine is anonymous and references a
  3237. lexical variable outside itself, then the outer and inner subroutines
  3238. will I<never> share the given variable.
  3239.  
  3240. This problem can usually be solved by making the inner subroutine
  3241. anonymous, using the C<sub {}> syntax.  When inner anonymous subs that
  3242. reference variables in outer subroutines are called or referenced,
  3243. they are automatically rebound to the current values of such
  3244. variables.
  3245.  
  3246. =item Variable syntax
  3247.  
  3248. (A) You've accidentally run your script through B<csh> instead
  3249. of Perl.  Check the #! line, or manually feed your script into
  3250. Perl yourself.
  3251.  
  3252. =item Warning: something's wrong
  3253.  
  3254. (W) You passed warn() an empty string (the equivalent of C<warn "">) or
  3255. you called it with no args and C<$_> was empty.
  3256.  
  3257. =item Warning: unable to close filehandle %s properly
  3258.  
  3259. (S) The implicit close() done by an open() got an error indication on the
  3260. close().  This usually indicates your file system ran out of disk space.
  3261.  
  3262. =item Warning: Use of "%s" without parentheses is ambiguous
  3263.  
  3264. (S) You wrote a unary operator followed by something that looks like a
  3265. binary operator that could also have been interpreted as a term or
  3266. unary operator.  For instance, if you know that the rand function
  3267. has a default argument of 1.0, and you write
  3268.  
  3269.     rand + 5;
  3270.  
  3271. you may THINK you wrote the same thing as
  3272.  
  3273.     rand() + 5;
  3274.  
  3275. but in actual fact, you got
  3276.  
  3277.     rand(+5);
  3278.  
  3279. So put in parentheses to say what you really mean.
  3280.  
  3281. =item Write on closed filehandle
  3282.  
  3283. (W) The filehandle you're writing to got itself closed sometime before now.
  3284. Check your logic flow.
  3285.  
  3286. =item X outside of string
  3287.  
  3288. (F) You had a pack template that specified a relative position before
  3289. the beginning of the string being unpacked.  See L<perlfunc/pack>.
  3290.  
  3291. =item x outside of string
  3292.  
  3293. (F) You had a pack template that specified a relative position after
  3294. the end of the string being unpacked.  See L<perlfunc/pack>.
  3295.  
  3296. =item Xsub "%s" called in sort
  3297.  
  3298. (F) The use of an external subroutine as a sort comparison is not yet supported.
  3299.  
  3300. =item Xsub called in sort
  3301.  
  3302. (F) The use of an external subroutine as a sort comparison is not yet supported.
  3303.  
  3304. =item You can't use C<-l> on a filehandle
  3305.  
  3306. (F) A filehandle represents an opened file, and when you opened the file it
  3307. already went past any symlink you are presumably trying to look for.
  3308. Use a filename instead.
  3309.  
  3310. =item YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
  3311.  
  3312. (F) And you probably never will, because you probably don't have the
  3313. sources to your kernel, and your vendor probably doesn't give a rip
  3314. about what you want.  Your best bet is to use the wrapsuid script in
  3315. the eg directory to put a setuid C wrapper around your script.
  3316.  
  3317. =item You need to quote "%s"
  3318.  
  3319. (W) You assigned a bareword as a signal handler name.  Unfortunately, you
  3320. already have a subroutine of that name declared, which means that Perl 5
  3321. will try to call the subroutine when the assignment is executed, which is
  3322. probably not what you want.  (If it IS what you want, put an & in front.)
  3323.  
  3324. =item [gs]etsockopt() on closed fd
  3325.  
  3326. (W) You tried to get or set a socket option on a closed socket.
  3327. Did you forget to check the return value of your socket() call?
  3328. See L<perlfunc/getsockopt>.
  3329.  
  3330. =item \1 better written as $1
  3331.  
  3332. (W) Outside of patterns, backreferences live on as variables.  The use
  3333. of backslashes is grandfathered on the right-hand side of a
  3334. substitution, but stylistically it's better to use the variable form
  3335. because other Perl programmers will expect it, and it works better
  3336. if there are more than 9 backreferences.
  3337.  
  3338. =item '|' and 'E<lt>' may not both be specified on command line
  3339.  
  3340. (F) An error peculiar to VMS.  Perl does its own command line redirection, and
  3341. found that STDIN was a pipe, and that you also tried to redirect STDIN using
  3342. 'E<lt>'.  Only one STDIN stream to a customer, please.
  3343.  
  3344. =item '|' and 'E<gt>' may not both be specified on command line
  3345.  
  3346. (F) An error peculiar to VMS.  Perl does its own command line redirection, and
  3347. thinks you tried to redirect stdout both to a file and into a pipe to another
  3348. command.  You need to choose one or the other, though nothing's stopping you
  3349. from piping into a program or Perl script which 'splits' output into two
  3350. streams, such as
  3351.  
  3352.     open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
  3353.     while (<STDIN>) {
  3354.         print;
  3355.         print OUT;
  3356.     }
  3357.     close OUT;
  3358.  
  3359. =item Got an error from DosAllocMem
  3360.  
  3361. (P) An error peculiar to OS/2.  Most probably you're using an obsolete
  3362. version of Perl, and this should not happen anyway.
  3363.  
  3364. =item Malformed PERLLIB_PREFIX
  3365.  
  3366. (F) An error peculiar to OS/2.  PERLLIB_PREFIX should be of the form
  3367.  
  3368.     prefix1;prefix2
  3369.  
  3370. or
  3371.  
  3372.     prefix1 prefix2
  3373.  
  3374. with nonempty prefix1 and prefix2.  If C<prefix1> is indeed a prefix
  3375. of a builtin library search path, prefix2 is substituted.  The error
  3376. may appear if components are not found, or are too long.  See
  3377. "PERLLIB_PREFIX" in F<README.os2>.
  3378.  
  3379. =item PERL_SH_DIR too long
  3380.  
  3381. (F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
  3382. C<sh>-shell in.  See "PERL_SH_DIR" in F<README.os2>.
  3383.  
  3384. =item Process terminated by SIG%s
  3385.  
  3386. (W) This is a standard message issued by OS/2 applications, while *nix
  3387. applications die in silence.  It is considered a feature of the OS/2
  3388. port.  One can easily disable this by appropriate sighandlers, see
  3389. L<perlipc/"Signals">.  See also "Process terminated by SIGTERM/SIGINT"
  3390. in F<README.os2>.
  3391.  
  3392. =back
  3393.  
  3394.