develooper Front page | perl.perl5.porters | Postings from April 2015

[perl #124420] [PATCH] $Carp::MaxArgNums off-by-one error

Thread Previous | Thread Next
James E Keenan via RT
April 30, 2015 00:46
[perl #124420] [PATCH] $Carp::MaxArgNums off-by-one error
Message ID:
On Tue Apr 28 21:16:05 2015, wrote:
> [NB:  I previously attempted to submit this via perlbug, but something
> seems to have gone wrong.  After not seeing it show up in the RT for
> more than two weeks, I'm trying a different route.  I apologize if
> this is a repeat post.]
> $Carp::MaxArgNums is documented to be the number of arguments to
> display in
> tracebacks, but it has a bug that means that the actual number of
> arguments
> displayed is $MaxArgNums + 1 .  Attached is a patch that fixes the
> behavior,
> improves tests to make the connection between $MaxArgNums and expected
> output
> more obvious, and adds an explanation of how to suppress all arguments
> to the
> documentation.
> Arguably, $Carp::MaxArgNums = 0 should mean 'no arguments' instead of
> 'all
> arguments', but this patch doesn't address that question.  Code that
> depends on
> the incorrect behavior will be broken by this patch, but code that was
> written
> as though the documentation was correct will work more correctly.

I created a branch from blead and applied your patch.  I then ran 'make test' as I customarily do.

I got two failures related to your patch.  One failure detected the fact that while you incremented the version number in, you did not do so in Carp/  That was easily fixed.

But the other failures were in dist/Carp/t/Carp.t and were more extensive.  I'm attaching the output.  We cannot proceed with failures like these.

Thank you very much.

James E Keenan (

via perlbug:  queue: perl5 status: new

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