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

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

Thread Previous
Tony Cook via RT
August 2, 2013 06:07
[perl #92446] Carp::cluck hides useful information in arguments
Message ID:
On Wed Jul 31 20:21:27 2013, wrote:
> Proposed patch attached.
> Feedback appreciated.
> Thanks,

yntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/ line
207, near ")
syntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/ line
210, near "elsif"
syntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/ line
219, near "} or"
syntax error at /home/tony/dev/perl/git/perl/dist/Carp/lib/ 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
 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.)


via perlbug:  queue: perl5 status: open

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