Skip Menu |

This queue is for tickets about the Type-Tiny CPAN distribution.

Report information
The Basics
Id: 96545
Status: resolved
Priority: 0/
Queue: Type-Tiny

People
Owner: Nobody in particular
Requestors: xenoterracide [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.046



Subject: 5.20+ fails compile( Optional ) if passing explicit undef
Date: Wed, 18 Jun 2014 22:41:56 -0500
To: bugs-type-tiny [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
Subject: Re: [rt.cpan.org #96545] AutoReply: 5.20+ fails compile( Optional ) if passing explicit undef
Date: Wed, 18 Jun 2014 23:10:56 -0500
To: bug-Type-Tiny [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
I apologize, I'm having trouble reproducing in Isolation... however this should be looked into, as there were no failures until perl 5.20 On Wed, Jun 18, 2014 at 10:42 PM, Bugs in Type-Tiny via RT <bug-Type-Tiny@rt.cpan.org> wrote: Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "5.20+ fails compile( Optional ) if passing explicit undef", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #96545]. Your ticket is accessible > on the web at: > > https://rt.cpan.org/Ticket/Display.html?id=96545 > > Please include the string: > > [rt.cpan.org #96545] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-Type-Tiny@rt.cpan.org > > ------------------------------------------------------------------------- > will send a testpull in a moment, however here's my cpan testers failing report > > http://www.cpantesters.org/cpan/report/2fe57704-f67a-11e3-9bbe-51720a370852 > > and a link to the code that's being validated > > https://github.com/xenoterracide/Business-CyberSource/blob/0.010000/t/error-exception.t > > -- > Caleb Cushing > > http://xenoterracide.com > > Calendar: > https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago
-- Caleb Cushing http://xenoterracide.com Calendar: https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago
Hi yes, I saw your comment on #moose. It came in at 4.00 am for me, so by the time I was awake you were gone. I've been keeping an eye on the channel for you to reappear, but I suppose we keep missing each other. The answer is that the 5.20 behaviour is the *correct* one. An explicit `undef` should *fail* an Optional[Foo] check. A value $x should only pass Optional[Foo] if it passes Foo, or if it does not *exist*. (See also the difference between `defined` and `exists`.) Unfortunately the behaviour of the Perl `exists` keyword is weird when applied to array elements, and especially when applied to the @_ array on Perl < 5.20. I've patched this in the repository now, so an explicit undef will fail Optional on all supported versions of Perl (5.6.1+). That is, they'll all behave like 5.20 does.
Resolved in 0.046.