develooper Front page | perl.perl5.porters | Postings from March 2018

[perl #132950] Blead Breaks CPAN: Dancer2

Thread Next
James E Keenan via RT
March 8, 2018 16:24
[perl #132950] Blead Breaks CPAN: Dancer2
Message ID:
On Thu, 08 Mar 2018 09:45:55 GMT, randir wrote:
> On Wed, 07 Mar 2018 23:21:55 -0800, wrote:
> > It looks like blead broke Dancer2:
> >
> > 97cfe85ef830
> I rather suspect a bug in Dancer2 itself. For me, version 0.201000
> passes tests on blead and version 0.202000 fails t/request.t as far
> back as 5.18. I didn't dig further.

I agree that this is more likely a case where, rather than "blead breaks CPAN", blead exposes sub-optimal code in CPAN.

The relevant code in Dancer2 is this:

    while (my ($name, $value) = each %{$cookies}) {
        $cookies->{$name} = Dancer2::Core::Cookie->new(
            name  => $name,
            value => [split(/[&;]/, $value)]

If $value is undefined within a given cookie -- as it explicitly is in one case (used 3 times) in t/request.t -- then it is not surprising that Dancer2::Core::Cookie->new() would fail.

I have submitted this pull request:

The p.r. clears up the exception and permits t/request.t to run to conclusion.  Three unit tests fail -- but I think that's due to how the tests are written and I'm leaving it up to the Dancer2 community to figure out how to address that.

I'll leave this ticket open, but I myself am *not* going to mark this as a blocker for 5.28.0.

Thank you very much.
James E Keenan (

via perlbug:  queue: perl5 status: open

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