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

Re: [perl #92446] Carp::cluck hides useful information in arguments

Thread Next
From:
Darin McBride
Date:
August 3, 2013 13:59
Subject:
Re: [perl #92446] Carp::cluck hides useful information in arguments
Message ID:
1657470.FTII2WHGWN@naboo
On Thursday August 1 2013 11:07:47 PM you wrote:
> On Wed Jul 31 20:21:27 2013, dmcbride@cpan.org wrote:
> > Proposed patch attached.
> > 
> > Feedback appreciated.
> > 
> > Thanks,
> 
> yntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/Carp.pm line
> 207, near ")

Gah. How did that slip in. :(

> Your subject line for the patch is (all of):
> 
> Subject: [PATCH] Carp now handles objects with string overloads. It also
>  allows objects to specify how they appear in the stack dump with a
> CARP_TRACE
>  method, and also allows the user to specify their own formatter for objects
> without CARP_TRACE as well as other references. [perl #92446]
> 
> Ideally the subject line should be fairly short.  The subject is taken
> from the first paragraph of the message in your editor, so if you meant
> the first sentence there to be the subject, you'll need a blank line
> after it.

It took my commit message.  I'll break that up for next time.

> The only other issue was the perldelta part of the patch failed to
> apply.  This isn't too big a deal, but since perldelta sees a fair
> amount of churn it might be good if the change to perldelta were a
> separate commit, to make it simpler to apply.  The separate commit lets
> me identify the commit the perldelta is for to simplify tracking for the
> release manager.

Fair enough.

> One test failed:
> 
> porting/manifest.t      (Wstat: 0 Tests: 10237 Failed: 3)
>   Failed tests:  10232, 10234-10235
> 
> but that's the sort of failure I just fix.
> 
> All that moaning out of the way, I think this is a useful change, though
> I wonder if we should have a more general "describe yourself" method for
> similar uses (intended for wider discussion.)

I look forward to any wider discussion.  I should point out in the docs that 
the purpose of CARP_TRACE is that Carp can't be called from within it.  Which 
was one of the major problems in bug 7589 where stringification of objects was 
removed.  So a "more general" method would have to also live within this 
restriction, which I thought was unlikely in general, but for objects where 
such might be true it's trivial enough to have CARP_TRACE be an alias for that 
other method, or to call the other method if *CARP_TRACE=\&other_method; is 
deemed too advanced :)

And thus why I am proposing a "describe yourself" method that is as /narrow/ 
as possible, rather than as general as possible.

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