in reply to overloading the print function (or alternatives)
But look at perlsub for the section on overriding built-in global functions. (You can do this per package or for all packages at once.)
Alternately you can look at perltie and create yourself a tied filehandle that you select before calling their code.
Personally rather than making this work as they want, I would select a tied filehandle that would take print's and cough and die with an informative error. Then people could still print to STDERR for debugging output.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: overloading the print function (or alternatives)
by Hot Pastrami (Monk) on Dec 04, 2000 at 23:42 UTC | |
by tilly (Archbishop) on Dec 04, 2000 at 23:57 UTC |