From: Jarkko Hietaniemi Date: Tue, 4 Dec 2007 03:28:47 +0000 (+0200) Subject: perltodo.pod: error message todo X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d6c1e11f74e0b1934c07d387ac61f44161f0b1d2;p=p5sagit%2Fp5-mst-13.2.git perltodo.pod: error message todo Message-Id: <200712040128.lB41SlT9445784@kosh.hut.fi> p4raw-id: //depot/perl@32564 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index 63da3f9..d308478 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -628,6 +628,31 @@ pass in at least the method name length, if not also pre-computed hash values when known. (I'm contemplating a plan to pre-compute hash values for common fixed strings such as C and pass them in to functions.) +=head2 Organize error messages + +Perl's diagnostics (error messages, see L) could use +reorganizing so that each error message has its +stable-for-all-eternity unique id, categorized by severity, type, and +subsystem. (The error messages would be listed in a datafile outside +of the Perl source code, and the source code would only refer the +messages by the is.) This clean-up and regularizing should apply +for all croak() messages. + +This would enable all sorts of things: easier translation/localization +of the messages (though please do keep in mind the caveats of +L about too straightforward approaches to +translation), filtering by severity, and instead of grepping for a +particular error message one could look for a stable error id. (Of +course, changing the error messages by default would break all the +existing software depending on some particular error message...) + +This kind of functionality is known as I. Look for +inspiration for example in the catgets() system, possibly even use it +if available-- but B if available, all platforms will B +catgets(). + +For the really pure at heart, consider extending this item to cover +also the warning messages (see L, C). =head1 Tasks that need a knowledge of the interpreter