develooper Front page | perl.perl5.porters | Postings from May 2004

[PATCH] Fix anomalies in Carp functions

Thread Next
Steve Hay
May 25, 2004 08:00
[PATCH] Fix anomalies in Carp functions
Message ID:
Twice before I've tried to get Carp changed so that carp() et al 
consistently suppress the " at <file> line <line>" message which they 
normally append to their argument if it ends with a newline.  See:

At the last attempt, Nick I-S pointed out that this an absurd request -- 
if you don't want such extra information, then why call carp() & friends 
in the first place?  Why not just use warn(), which does behave this way 
:)  The whole point of carp() etc is to give extra information.

My confusion arose from the fact that carp() sometimes *does* suppress 
the extra message, and cluck() always suppresses the extra bit (though 
not the stacktrace).  The same situation arises w.r.t. croak() and 
confess().  This can all be seen from the attached script and module.

The attached patch irons out these oddities, and adjusts a couple of 
tests that are affected.

- Steve

Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.

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