From: gfx Date: Mon, 7 Dec 2009 05:13:52 +0000 (+0900) Subject: Tweaks for ouse.pm X-Git-Tag: 0.43~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2317290d1ad8d69395376e9d76df8e3f0172bce;p=gitmo%2FMouse.git Tweaks for ouse.pm --- diff --git a/lib/ouse.pm b/lib/ouse.pm index 6ebf64dc..cebb5f9 100644 --- a/lib/ouse.pm +++ b/lib/ouse.pm @@ -1,7 +1,6 @@ package ouse; -use strict; -use warnings; +use Mouse::Util; # enables strict and warnings BEGIN { my $package; @@ -9,7 +8,7 @@ BEGIN { $package = $_[1] || 'Class'; if ($package =~ /^\+/) { $package =~ s/^\+//; - eval "require $package; 1" or die; + Mouse::Util::load_class($package); } } use Filter::Simple sub { s/^/package $package;\nuse Mouse;\n/; }