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

Re: [ID 20010826.005] Carp fails for overloaded object

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
August 28, 2001 01:17
Subject:
Re: [ID 20010826.005] Carp fails for overloaded object
Message ID:
20010828081717.700.1@bactrian.ni-s.u-net.com
<mjd@plover.com> writes:
>
>I have identified a minor bug in Carp::Heavy.pm.
>
>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
http://www.ni-s.u-net.com/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About