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

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

Thread Previous
From:
Tony Cook via RT
Date:
August 2, 2013 06:07
Subject:
[perl #92446] Carp::cluck hides useful information in arguments
Message ID:
rt-3.6.HEAD-2552-1375423666-1016.92446-15-0@perl.org
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 ")
        "
syntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/Carp.pm line
210, near "elsif"
syntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/Carp.pm line
219, near "} or"
syntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/Carp.pm line
222, near "}"

which I think is from the missing } for the do block:

+            $arg = $arg->CARP_TRACE();
+        }
+        elsif (do {
+                local $@;
+                eval {$arg = $RefArgFormatter->($arg); 1}
+                )
+        {
+            1;

which indeed does fix it.

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.

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.

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.)

Tony

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

Thread Previous


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