Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 74574
Status: resolved
Priority: 0/
Queue: MooseX-Types-NumUnit

People
Owner: Nobody in particular
Requestors: DROLSKY [...] cpan.org
Cc:
AdminCc:

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



Subject: Doesn't actually use MooseX::Types
Most (all?) other modules that start with MooseX::Types:: actually use the MooseX::Types module. The fact that this one doesn't is quite confusing. I'd suggest either using it renaming it (maybe MooseX::TypeLibrary?).
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Tue, 31 Jan 2012 17:05:36 -0600
To: bug-MooseX-Types-NumUnit [...] rt.cpan.org
From: Joel Berger <joel.a.berger [...] gmail.com>
For the purposes of staying in the fold, I would rather try to have MX::T:NumUnit rely on MX::T. As you notice, there really isn't a well defined place to put non-MX::T types. It was for that reason that I made my 2 global types things that weren't likely to be stumbled on. My fear is how well my logic can handle the namespaced types. It might be fine, I'm just not sure. If I really can't fit it into the framework I guess it should leave the namespace. Still it goes to show that being under a namespace can give a certain (sometimes false) impression. My blog knows it, even if my modules don't. Sorry about this, I didn't mean to be a bother, but I also didn't know where it should go. Perhaps this is `MooseY::Types::NumUnit` :-0 On Tue, Jan 31, 2012 at 4:32 PM, Dave Rolsky via RT <bug-MooseX-Types-NumUnit@rt.cpan.org> wrote: Show quoted text
> Tue Jan 31 17:32:09 2012: Request 74574 was acted upon. > Transaction: Ticket created by DROLSKY >       Queue: MooseX-Types-NumUnit >     Subject: Doesn't actually use MooseX::Types >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: DROLSKY@cpan.org >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74574 > > > > Most (all?) other modules that start with MooseX::Types:: actually use > the MooseX::Types module. The fact that this one doesn't is quite > confusing. > > I'd suggest either using it renaming it (maybe MooseX::TypeLibrary?). >
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Tue, 31 Jan 2012 18:44:26 -0600
To: bug-MooseX-Types-NumUnit [...] rt.cpan.org
From: Joel Berger <joel.a.berger [...] gmail.com>
From a Devil's advocate point of view, perhaps MooseX::Types should have been named MooseX::TypeLibrary. I have been racking my brain trying to think of a good namespace for this module. My favorite so far is further polluting MooseX:: with MooseX::NumUnit. You can see how this again just confirms the point of blog post. Moose:: is by convention (and rightly so) for official Moose business only. But since MooseX::Types squats on what really is the most descriptive name for an Unofficial Type for Moose, I am left in the cold. Again the best solution is to work MooseX::Types::NumUnit back into the fold. Its been a frustrating day. Show quoted text
>> >> I'd suggest either using it renaming it (maybe MooseX::TypeLibrary?). >>
>
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Wed, 1 Feb 2012 10:05:26 -0600 (CST)
To: Joel Berger via RT <bug-MooseX-Types-NumUnit [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 31 Jan 2012, Joel Berger via RT wrote: Show quoted text
> I have been racking my brain trying to think of a good namespace for > this module. My favorite so far is further polluting MooseX:: with > MooseX::NumUnit. > > You can see how this again just confirms the point of blog post. > Moose:: is by convention (and rightly so) for official Moose business > only. But since MooseX::Types squats on what really is the most > descriptive name for an Unofficial Type for Moose, I am left in the > cold. > > Again the best solution is to work MooseX::Types::NumUnit back into the fold.
The more I think about this the more I'm convinced that any type library on CPAN needs to use MX::Types. The global type name issues are too big a problem for shared libraries. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Wed, 1 Feb 2012 12:50:06 -0600
To: bug-MooseX-Types-NumUnit [...] rt.cpan.org
From: Joel Berger <joel.a.berger [...] gmail.com>
Show quoted text
>> >> Again the best solution is to work MooseX::Types::NumUnit back into the fold.
> > The more I think about this the more I'm convinced that any type library > on CPAN needs to use MX::Types. The global type name issues are too big a > problem for shared libraries. > > > -dave
Please take what I am about to say impersonally because I think the work that you and Jesse and Stevan and Florian have done for Perl is spectacular. Moose has been a godsend. That said, if the type system is so global and fragile that the built-in simple way to make types should not be used by anyone, and further they must use the fairly magical and (sorry) inscrutible MooseX::Types, then the type system needs to be re-thought. MooseX::Types::NumUnit has an elaborate system of anonymous type generators which represent subtypes of NumUnit which is a subtype of Num, but with automated from_Str conversions. Even were this the only consideration, I could probably make this all work, but I also have an internal implementation of MooseX::AlwaysCoerce which will set coerce => 1 for all NumUnit types. This is the logic that I worry about when sitting under MooseX::Types. When I get a chance I will try to see how well it can work. A much easier fix might be to emulate the way that (I think) MX::T does its magic. I could make an anonymous type to represent NumUnit (say $numunit), then I could make a nullary exportable function NumUnit() which returns that anonymous type. This could then let me use the fully qualified path to the anonymous type inside the logic which emulates MX::AC. I know that seems convoluted, but it would keep from polluting the now universally guarded types namespace. Breathe. Ok I'm back. Sorry, you have caught me on a couple of days where perhaps I shouldn't be answering mail.
CC: DROLSKY [...] cpan.org
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Wed, 1 Feb 2012 12:57:40 -0600 (CST)
To: Joel Berger via RT <bug-MooseX-Types-NumUnit [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 1 Feb 2012, Joel Berger via RT wrote: Show quoted text
> That said, if the type system is so global and fragile that the > built-in simple way to make types should not be used by anyone, and > further they must use the fairly magical and (sorry) inscrutible > MooseX::Types, then the type system needs to be re-thought.
Yeah, all the core Moose devs agree. We want something that's safe like MX::Types, but without some of its gotchas. We haven't quite figured that out yet though. Any ideas you have would be welcome. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Wed, 1 Feb 2012 13:22:23 -0600
To: bug-MooseX-Types-NumUnit [...] rt.cpan.org
From: Joel Berger <joel.a.berger [...] gmail.com>
Show quoted text
>
>> That said, if the type system is so global and fragile that the >> built-in simple way to make types should not be used by anyone, and >> further they must use the fairly magical and (sorry) inscrutible >> MooseX::Types, then the type system needs to be re-thought.
> > Yeah, all the core Moose devs agree. We want something that's safe like > MX::Types, but without some of its gotchas. We haven't quite figured that > out yet though. Any ideas you have would be welcome. > > > -dave
/me wipes brow I'm glad to hear you say that. I was afraid I was being irrational. I would be happy to try to think of something. For a first step, would it be hard to implement a warning when a second type of the same name is created? I will think about this. And I will get to trying to work out this module's global-ness the next time I have a chance. Again, and I really mean it. Thanks for all you (and the other devs) do. Pardon that previous rant of mine, its not who I usually am. Joel Berger
CC: DROLSKY [...] cpan.org
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Wed, 1 Feb 2012 13:41:23 -0600 (CST)
To: Joel Berger via RT <bug-MooseX-Types-NumUnit [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 1 Feb 2012, Joel Berger via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=74574 > >
>>
>>> That said, if the type system is so global and fragile that the >>> built-in simple way to make types should not be used by anyone, and >>> further they must use the fairly magical and (sorry) inscrutible >>> MooseX::Types, then the type system needs to be re-thought.
>> >> Yeah, all the core Moose devs agree. We want something that's safe like >> MX::Types, but without some of its gotchas. We haven't quite figured that >> out yet though. Any ideas you have would be welcome. >> >> >> -dave
> > /me wipes brow > > I'm glad to hear you say that. I was afraid I was being irrational. I > would be happy to try to think of something. For a first step, would > it be hard to implement a warning when a second type of the same name > is created? I will think about this.
This really isn't the place to discuss this. The best place is #moose-dev on irc.perl.org or the moose mailing list. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #74574] Doesn't actually use MooseX::Types
Date: Tue, 7 Feb 2012 13:57:09 -0600
To: bug-MooseX-Types-NumUnit [...] rt.cpan.org
From: Joel Berger <joel.a.berger [...] gmail.com>
Fixed in GitHub repo. Will be 0.02 release. On Wed, Feb 1, 2012 at 1:41 PM, autarch@urth.org via RT <bug-MooseX-Types-NumUnit@rt.cpan.org> wrote: Show quoted text
>       Queue: MooseX-Types-NumUnit >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74574 > > > On Wed, 1 Feb 2012, Joel Berger via RT wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=74574 > >>
>>>
>>>> That said, if the type system is so global and fragile that the >>>> built-in simple way to make types should not be used by anyone, and >>>> further they must use the fairly magical and (sorry) inscrutible >>>> MooseX::Types, then the type system needs to be re-thought.
>>> >>> Yeah, all the core Moose devs agree. We want something that's safe like >>> MX::Types, but without some of its gotchas. We haven't quite figured that >>> out yet though. Any ideas you have would be welcome. >>> >>> >>> -dave
>> >> /me wipes brow >> >> I'm glad to hear you say that. I was afraid I was being irrational. I >> would be happy to try to think of something. For a first step, would >> it be hard to implement a warning when a second type of the same name >> is created? I will think about this.
> > This really isn't the place to discuss this. The best place is #moose-dev > on irc.perl.org or the moose mailing list. > > > -dave > > /*============================================================ > http://VegGuide.org               http://blog.urth.org > Your guide to all that's veg      House Absolute(ly Pointless) > ============================================================*/ >
RT-Send-CC: autarch [...] urth.org
Version 0.02 has been released. This version does use MooseX::Types.