develooper Front page | perl.perl5.porters | Postings from September 2000

perldiag and warnings from standard modules/pragmas.

Thread Next
From:
abigail
Date:
September 25, 2000 20:03
Subject:
perldiag and warnings from standard modules/pragmas.
Message ID:
20000926030014.31958.qmail@foad.org
perldiag.pod is a great document for finding information about warning
and error messages perl might throw at you. It should be mandatory 
reading material for any Perl programmer, and it greatly reduced time
explaining messages to people - you can just provide a pointer.

However, there are many standard modules and pragmas [1] that generate errors
and warnings as well. Most of them are not mentioned in perldiag, and many
of them aren't even found in a DIAGNOSTICS section in their pods. People
here generally know a warning or error isn't from Perl but from a module
or a pragma, but many programmers don't know the difference.

Would it be a good idea to extend perldiag.pod with all the warnings and
error messages generated by standard modules and pragmas? And that the
same information is found in DIAGNOSTICS section in the pod of such modules
and pragmas? (Of course, to avoid duplication and cut-and-paste, perldiag.pod
could be automatically generated).

As a separate, but related point: should the use of warn() be banned from
standard modules and pragmas in favour of use warnings/warnif()?


[1] That is, anything that comes in the perl tarball.



Abigail

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About