--- perl-5.9.x/pod/perltodo.pod.dist 2007-12-02 16:48:46.000000000 +0200 +++ perl-5.9.x/pod/perltodo.pod 2007-12-04 03:27:53.000000000 +0200 @@ -628,6 +628,31 @@ when known. (I'm contemplating a plan to pre-compute hash values for common fixed strings such as C<ISA> and pass them in to functions.) +=head2 Organize error messages + +Perl's diagnostics (error messages, see L<perldiag>) 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<Locale::Maketext> 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<message catalogs>. Look for +inspiration for example in the catgets() system, possibly even use it +if available-- but B<only> if available, all platforms will B<not> +catgets(). + +For the really pure at heart, consider extending this item to cover +also the warning messages (see L<perllexwarn>, C<warnings.pl>). =head1 Tasks that need a knowledge of the interpreterThread Next