However warnings.pm introduces some very annoying behaviour. It badly misused $Carp::CarpLevel with the result that their carps usually overflow the callstack and give them a cluck instead. But not always. If the error is deep in a stack of function calls, they may carp very near the surface. And certain kinds of import errors also occur at the wrong level.
Which goes to show that $Carp::CarpLevel was a bad idea. Unfortunately fixing warnings to use the new @CARP_NOT array to get more sensible behaviour is a lot of work because of the fact that every last annoying detail of the current misbehaviour has been nailed down by tests. :-(
A tip. Writing tests to nail down that code shall behave in an inconvenient way is a code smell. Fix the code to behave reasonably first and THEN write tests to guarantee that it won't change.
In reply to Re: Re: Perl Gotchas.
by tilly
in thread Perl Gotchas.
by EvdB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |