diff options
author | Sam Tregar <sam@tregar.com> | 2002-01-05 19:29:25 -0500 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-01-06 04:52:50 +0000 |
commit | 420cdfc116ef70c5fc76ac6f0fd68df66919fd46 (patch) | |
tree | 576bd15f4f0b7295bc55a41b75c400563a7d35cc /pod/perlsub.pod | |
parent | 36df99d62e5fb6553737ac83b8d35e75836213ae (diff) | |
download | perl-420cdfc116ef70c5fc76ac6f0fd68df66919fd46.tar.gz |
Bad prototype detection now an optional warning
Message-Id: <Pine.LNX.4.33.0201060023160.3715-200000@localhost.localdomain>
p4raw-id: //depot/perl@14101
Diffstat (limited to 'pod/perlsub.pod')
-rw-r--r-- | pod/perlsub.pod | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod index aa5fd5b2cf..a1bba6eb31 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -1021,6 +1021,13 @@ programmers, and that it will not intrude greatly upon the meat of the module, nor make it harder to read. The line noise is visually encapsulated into a small pill that's easy to swallow. +If you try to use an alphanumeric sequence in a prototype you will +generate an optional warning - "Illegal character in prototype...". +Unfortunately earlier versions of Perl allowed the prototype to be +used as long as its prefix was a valid prototype. The warning may be +upgraded to a fatal error in a future version of Perl once the +majority of offending code is fixed. + It's probably best to prototype new functions, not retrofit prototyping into older ones. That's because you must be especially careful about silent impositions of differing list versus scalar contexts. For example, |