From: Peter Rabbitson Date: Thu, 9 Sep 2010 10:38:31 +0000 (+0000) Subject: Lazy-load Class::Inspector X-Git-Tag: v0.09006~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=01249db5ac260145f63d27b4f386f28023f207ec;p=p5sagit%2FClass-Accessor-Grouped.git Lazy-load Class::Inspector --- diff --git a/lib/Class/Accessor/Grouped.pm b/lib/Class/Accessor/Grouped.pm index 5cd7e95..69fbcfa 100644 --- a/lib/Class/Accessor/Grouped.pm +++ b/lib/Class/Accessor/Grouped.pm @@ -2,7 +2,6 @@ package Class::Accessor::Grouped; use strict; use warnings; use Carp (); -use Class::Inspector (); use Scalar::Util (); use MRO::Compat; use Sub::Name (); @@ -456,6 +455,7 @@ it. This method will die if the specified class could not be loaded. sub set_component_class { if ($_[2]) { local $^W = 0; + require Class::Inspector; if (Class::Inspector->installed($_[2]) && !Class::Inspector->loaded($_[2])) { eval "use $_[2]";