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

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

From:
Tony Cook via RT
Date:
August 9, 2013 06:48
Subject:
[perl #92446] Carp::cluck hides useful information in arguments
Message ID:
rt-3.6.HEAD-2552-1376030895-1410.92446-15-0@perl.org
On Sat Aug 03 06:59:46 2013, dmcbride wrote:
> 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.

Based on that I've applied it as
b4bf645b3dc95fedce112cfc905ae1c368510923, with the fix above, an update
to MANIFEST and a reformatted commit message.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=92446



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