develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [ID 20010826.005] Carp fails for overloaded object

Thread Previous | Thread Next
Nick Ing-Simmons
August 28, 2001 01:17
Re: [ID 20010826.005] Carp fails for overloaded object
Message ID:
<> writes:
>I have identified a minor bug in
>If a class has overloaded the "" operator and it also uses Carp then
>when calling carp/croak the object reference will be stringified by
>carp.  This also can lead to deep recursion if the stringify routine
>also calls cluck/confess.

This can also be considered a feature - so that overloaded objects 
can decide how they apear in error messages.

As for cluck/confess on stringify - don't do that ;-)

Nick Ing-Simmons

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About