Skip Menu |

This queue is for tickets about the MooseX-Types-Common CPAN distribution.

Report information
The Basics
Id: 85471
Status: rejected
Priority: 0/
Queue: MooseX-Types-Common

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

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



Subject: Boolean coercions
Date: Mon, 20 May 2013 12:35:37 -0500
To: bugs-moosex-types-common [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
would patches be accepted for a ::Boolean which is primarily for coercion's rather than validation? -- Caleb Cushing http://xenoterracide.com
Subject: Re: [rt.cpan.org #85471] Boolean coercions
Date: Mon, 20 May 2013 12:28:20 -0700
To: Caleb Cushing via RT <bug-MooseX-Types-Common [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Mon, May 20, 2013 at 01:35:52PM -0400, Caleb Cushing via RT wrote: Show quoted text
> would patches be accepted for a ::Boolean which is primarily for > coercion's rather than validation?
Can you clarify what you mean? e.g. show what kinds of coercions would be supported?
Subject: Re: [rt.cpan.org #85471] Boolean coercions
Date: Tue, 21 May 2013 05:06:55 -0500
To: bug-MooseX-Types-Common [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
On Mon, May 20, 2013 at 2:28 PM, Karen Etheridge via RT <bug-MooseX-Types-Common@rt.cpan.org> wrote: Show quoted text
> Can you clarify what you mean? e.g. show what kinds of coercions would be > supported?
thinking about it, I decided to put it with my remote helper type library. But mostly obvious things like true, false, yes, no to bool. This tends to be useful when interfacing with other systems. https://metacpan.org/module/MooseX::RemoteHelper::Types -- Caleb Cushing http://xenoterracide.com
Subject: Re: [rt.cpan.org #85471] Boolean coercions
Date: Tue, 21 May 2013 10:31:19 -0700
To: Caleb Cushing via RT <bug-MooseX-Types-Common [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Tue, May 21, 2013 at 06:07:11AM -0400, Caleb Cushing via RT wrote: Show quoted text
> Queue: MooseX-Types-Common > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85471 > > > On Mon, May 20, 2013 at 2:28 PM, Karen Etheridge via RT > <bug-MooseX-Types-Common@rt.cpan.org> wrote:
> > Can you clarify what you mean? e.g. show what kinds of coercions would be > > supported?
> > thinking about it, I decided to put it with my remote helper type > library. But mostly obvious things like true, false, yes, no to bool. > This tends to be useful when interfacing with other systems.
Coercing the string 'false' to bool (as '', not 1) would be a change in existing behaviour, so I'd be concerned about inadvertently breaking things -- but it would certainly be fine to add a new type that coerced this way.
Subject: Re: [rt.cpan.org #85471] Boolean coercions
Date: Fri, 24 May 2013 12:09:05 -0500
To: bug-MooseX-Types-Common [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
On Tue, May 21, 2013 at 12:31 PM, Karen Etheridge via RT <bug-MooseX-Types-Common@rt.cpan.org> wrote: Show quoted text
> Coercing the string 'false' to bool (as '', not 1) would be a change in > existing behaviour, so I'd be concerned about inadvertently breaking things > -- but it would certainly be fine to add a new type that coerced this way.
you'll note of course that my coercion is a new type that I've simply called "Bool" it's not the same as the Moose Bool. I think the question, which I haven't answered is whether these kinds of behaviors fit well within the MooseX::Types::Common library. -- Caleb Cushing http://xenoterracide.com
Closing -- I think this would be better off in a separate MooseX::Types::Boolean, so we don't inadvertently break existing usages of the Bool type. On 2013-05-24 10:09:26, XENO wrote: Show quoted text
> On Tue, May 21, 2013 at 12:31 PM, Karen Etheridge via RT > <bug-MooseX-Types-Common@rt.cpan.org> wrote:
> > Coercing the string 'false' to bool (as '', not 1) would be a change > > in > > existing behaviour, so I'd be concerned about inadvertently breaking > > things > > -- but it would certainly be fine to add a new type that coerced this > > way.
> > > you'll note of course that my coercion is a new type that I've simply > called "Bool" it's not the same as the Moose Bool. I think the > question, which I haven't answered is whether these kinds of behaviors > fit well within the MooseX::Types::Common library. > > -- > Caleb Cushing > > http://xenoterracide.com