Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

MooseX::Declare #12

Closed
schwern opened this Issue Apr 27, 2009 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

schwern commented Apr 27, 2009

MooseX::Declare is sexy. It also solves the problem of Moose load time since it can lazy load when class() is called.

I have found that the recent versions of MooseX::Declare itself adds at least 1 second to the compile time of a program. Therefore, I have made it an optional feature in my own fork of perl5i. A quick 'use perl5i moose => 1;' will enable it in the global level.

Then in your class myclass { statement you need to include 'use perl5i' again (without the moose => 1 this time) as I haven't figured out how to make that automatically get added to the class and role statements. If anyone knows, please feel free to fork and fix!

@supernovus : To me, I think needing to name what you want is contrary to the goal of perl5i. Instead, perhaps something like

 use per5i  -skip => [qw( Moose )];

Would be desirable, as in, use Moose by default, for people who don't know any better, but for the people who actually need the benefit, and know better, they can exclude it.

Contributor

schwern commented Aug 1, 2010

As you can load MooseX::Declare in use line, you don't benefit from an option to have perl5i load it for you.

As its load time is atrocious and MooseX::Method::Signatures' runtime performance is horrifying, it cannot be loaded by default. To do so assumes that A) most people are writing OO code and B) they're using Moose.

MouseX::Declare might be interesting...

Contributor

schwern commented Feb 27, 2013

I'm going to close this up as MooseX::Declare has both serious compile and runtime performance issues. It can be reopened another time.

@schwern schwern closed this Feb 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment