in reply to Carp; errors ala DBI
AUTOLOAD is a namespace hog living in the global namespace.
Client code can't avoid your AUTOLOAD routine.
In your case it is an inappropriate solution. You know
the names of the routines you want to call.
You might want to use a constant for config branching:
this will eliminate the unneeded branch at compile time.use constant ERRSTR => 1; if ( ERRSTR) { # errstr stuff }else{ # carp stuff }
UPDATED: because I was behind times regarding existence of NEXT.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Carp; errors ala DBI
by pope (Friar) on Sep 20, 2002 at 05:51 UTC | |
by rir (Vicar) on Sep 21, 2002 at 01:41 UTC | |
by adrianh (Chancellor) on Sep 21, 2002 at 13:36 UTC |