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

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

Thread Next
From:
Alexander D'Archangel
Date:
April 30, 2015 16:26
Subject:
Re: [perl #124420] [PATCH] $Carp::MaxArgNums off-by-one error
Message ID:
CA+9xxJ7k_wkCZaqZbZ+YBFoUpbDF2ZzKa+ZwBuMVy4uUOSY5pg@mail.gmail.com
Thank you very much for your attention.  I'm not sure how I missed the
failure in heavy.t; it happens here, too, and I have updated the proposed
patch to address that failure.  Sorry for that mistake.

I'm a little confused by the other failure messages you got, though.  The
failures you forwarded me are the ones that test the new behavior.  This
error is exactly what I would expect to see if one were to run the new
tests against the old version of the library.  I can't reproduce them; make
test with my patch applied to 996de84d864e2452987ceb29dbf56f1ce92846b8
comes back clean.  I'm going to shortly update the patch with one that
takes care of the heavy.t failure and also makes the failure messages you
sent me less hideous.  In the meantime, though, I wonder if there is some
chance that the new tests got run against the old library.

Thank you,

D'A

On Wed, Apr 29, 2015 at 5:46 PM James E Keenan via RT <
perlbug-followup@perl.org> wrote:

> On Tue Apr 28 21:16:05 2015, darksuji@gmail.com 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 Carp.pm, you did not do so
> in Carp/Heavy.pm.  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 (jkeenan@cpan.org)
>

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