NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Put it in a module! (Score:2)
But since lots of people don't use the command line (they hit Perl via a batch script or similar) now I might also need to hijack perl.exe entirely to deal with it (except that breaks things that do pass-through code to child Perl's for process isolation reasons).
Eh, no, you don't have to patch perl.exe. Instead, put it in a module. Just like diagnostics [perl.org] does nothing but explaining warnings and errors better.
You can load this module on the command line using -M, or you could set an environment variable like PERL5LIB, so it gets used in every Perl script that gets run from the batch file.
Reply to This
Re: (Score:1)
If the executable supported localization and translation files, swapping in other error messages would be easier. (Replacing them entirely might not be as easy though.)
Re: (Score:2)
I can't load this module on the command line, as I am neither the person who wrote this code nor am I the person running this code.
The people doing both the writing and the running are not on this website, and do not have the benefit of this suggestion (which is why any answer that involves eduction doesn't work in general).
I can't modify the site perl script, because I'm only the vendor of the Perl distribution, not the site.
And I'm a teensy bit dubious about PERL5LIB, one because it won't work under taint
sitecustomize.pl (Score:1)
-Dusesitecustomize, and put it in there. That's exactly what it's there for, and anyone who knows enough to know they don't want it can turn it off with the-fswitch.