From: Dave Rolsky Date: Sun, 19 Jul 2009 16:57:35 +0000 (-0500) Subject: Revert "Lazy load Moose::Error::Default" X-Git-Tag: 0.88~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=77f1441155c791b0cd453cf2aa361c61333eef87;p=gitmo%2FMoose.git Revert "Lazy load Moose::Error::Default" This reverts commit d4b0f089e5fc9ddbd38a0bd369bb170c5c62eaef. This sort of lazy loading hurts anyone using Moose in a long-running environment like FastCGI or mod_perl, since it means that the module ends up being loaded once per process, as opposed to being loaded once and shared across multiple procs. --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 41e0e9f..06e2d23 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -17,6 +17,7 @@ our $AUTHORITY = 'cpan:STEVAN'; use Moose::Meta::Method::Overridden; use Moose::Meta::Method::Augmented; +use Moose::Error::Default; use Moose::Meta::Class::Immutable::Trait; use Moose::Meta::Method::Constructor; use Moose::Meta::Method::Destructor; @@ -610,7 +611,6 @@ sub raise_error { sub create_error { my ( $self, @args ) = @_; - require Moose::Error::Default; require Carp::Heavy; local $error_level = ($error_level || 0 ) + 1;