Skip Menu |

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

Report information
The Basics
Id: 46601
Status: stalled
Priority: 0/
Queue: MooseX-Declare

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

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



Subject: Delay loading Moose
I would like to add MooseX::Declare to perl5i, a module which improves as much of Perl as possible in a single line. Trouble is, MooseX::Declare takes almost 700ms to load. I don't want to wreck the startup time for all non-OO perl5i users. Would it be possible for MooseX::Declare to delay loading Moose until runtime when class is called, or perhaps at compile time delay loading until it sees a class keyword in the code?
On Tue Jun 02 01:20:06 2009, MSCHWERN wrote: Show quoted text
> Trouble is, MooseX::Declare takes almost 700ms to load. I don't want to > wreck the startup time for all non-OO perl5i users.
I see your point, and I'd like to se MX::Declare being part of p5i. Show quoted text
> Would it be > possible for MooseX::Declare to delay loading Moose until runtime when > class is called, or perhaps at compile time delay loading until it sees > a class keyword in the code?
It certainly isn't impossible, but probably extremly inconvenient, given that both MX::Declare and MX::Method::Signatures are implemented using Moose internally. I guess I would accept patches adding the requested feature, if they don't make maintainance a lot harder. Sorry.