Re: Using Moose::Role as an Exporter replacement

2013-08-01 Thread Jed Lund
I'm not sure is the 'why it's wrong' is as compelling as a 'how could it be better argument'. (TIMTOWDI and NIH are alive!) In this particular example it looks like a custom type style usage (maybe entirely unnecessary but still) for custom types there are already several great (Moo(se)y) ways to

Re: Using Moose::Role as an Exporter replacement

2013-08-01 Thread Chris Prather
Well they're relying on undefined behavior. Roles are defined to only compose *methods* not functions and relying on what they're doing a something that will "work" isn't guranteed to always work. Given a testcase and a patch that fixes it (but doesn't break anything else) I would argue Moose sh

Re: Using Moose::Role as an Exporter replacement

2013-08-01 Thread Bill Moseley
I just noticed this code again a work, and then found this email that I don't see every received a response. Can anyone provide their insight? On Sun, Sep 18, 2011 at 11:34 PM, Bill Moseley wrote: > I'm on vacation and have finally found wireless to check out the svn logs > back at work. I fo

Using Moose::Role as an Exporter replacement

2011-09-18 Thread Bill Moseley
I'm on vacation and have finally found wireless to check out the svn logs back at work. I found a bunch of new Moose Roles created that are being used like one might use Exporter. Here's an example: package App::Role::Date; use strict; use warnings; use Moose::Role; use DateTime; use Carp; sub

RE: Using Moose with Expect.pm

2011-07-18 Thread Romo, Arne C (CFE : Fort Collins)
oseX/NonMoose/InsideOut.pm line 4 require c.pm called at -e line 1 main::BEGIN() called at /usr/local/share/perl5/MooseX/NonMoose/InsideOut.pm line 4 eval {...} called at /usr/local/share/perl5/MooseX/NonMoose/InsideOut.pm line 4 BEGIN failed--compilation aborted at c.pm

Re: Using Moose with Expect.pm

2011-07-18 Thread Jesse Luehrs
On Mon, Jul 18, 2011 at 10:18:25PM +, Arne Romo wrote: > I need help understanding how to use Moose to "extend" Expect.pm. > It occurred to me that since Expect.pm is a non-moose module I need the > "use MooseX::NonMoose;" > but my simple test program still fails. > > Below I've include my

Using Moose with Expect.pm

2011-07-18 Thread Arne Romo
I need help understanding how to use Moose to "extend" Expect.pm. It occurred to me that since Expect.pm is a non-moose module I need the "use MooseX::NonMoose;" but my simple test program still fails. Below I've include my simple perl script showing it fail when I use the "extends" and passin

Re: using moose?

2011-06-29 Thread Shlomi Fish
Hi pangj, On Mon, 27 Jun 2011 09:56:14 +0100 pa...@laposte.net wrote: > > I have been taking some time learning moose. > Moose looks somewhat like the Ruby OO. There are still many differences. > does it get heavily used in production application? > Yes, it does. http://www.catalystframework

Re: using moose?

2011-06-27 Thread pangj
Thanks for the info. Continue to study it.. > Message du 27/06/11 13:28 > De : "Stevan Little" > A : "pa...@laposte.net" > Copie à : "moose@perl.org" > Objet : Re: using moose? > > Yes. Moose is heavily used in quite a lot of places for

Re: using moose?

2011-06-27 Thread Stevan Little
Yes. Moose is heavily used in quite a lot of places for production level work. Take a look at the "About" page on the moose website to see a ( non comprehensive, but pretty good sized ) list of companies that use moose. http://www.iinteractive.com/moose/about.html -Stevan On Jun 27, 2011, at

using moose?

2011-06-27 Thread pangj
I have been taking some time learning moose. Moose looks somewhat like the Ruby OO. does it get heavily used in production application? Thanks. Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ? Je crée ma boîte mail www.laposte.net

Re: Using Moose with Dynamic Packages

2009-06-19 Thread Ovid
- Original Message > From: Stevan Little > > my $meta = Moose::Meta::Class->create( > name => $package, > superclasses => [ 'Some::Base::Class' ], > roles => [ 'Does::Something' ] > ); > > $meta->make_immutable; Thank you! Just one little tweak: my $meta = Moose::Meta

Re: Using Moose with Dynamic Packages

2009-06-19 Thread Stevan Little
my $meta = Moose::Meta::Class->create( name => $package, superclasses => [ 'Some::Base::Class' ], roles => [ 'Does::Something' ] ); $meta->make_immutable; On Jun 19, 2009, at 6:08 AM, Ovid wrote: I have some code which looks (roughly) like this: foreach my $thing (@things) {

Using Moose with Dynamic Packages

2009-06-19 Thread Ovid
I have some code which looks (roughly) like this: foreach my $thing (@things) { my $package = get_package($thing); eval <<"END"; package $package; use Moose; extends 'Some::Base::Class'; with 'Does::Something'; END confess $@

Re: Question about creating objects using Moose::Meta::Class

2008-08-27 Thread Stevan Little
Tom, The new_object method on the metaclass does not call BUILD, this is only called by Moose::Object::new, and more specifically Moose::Object::BUILDALL. The BUILD initialization feature is a part of Moose::Object and not the underlying MOP. The thinking is that the division of responsib

Question about creating objects using Moose::Meta::Class

2008-08-27 Thread Bald Man Tom
Greetings. I was leafing through the Moose documentation the other day when I stumbled across Moose::Meta::Class. If I understand correctly, one of the things I can do with this module is create metaclasses, then use those to create new objects. However, when I do so, the BUILD subs don't se