From: Chris Prather Date: Fri, 12 Oct 2007 02:55:17 +0000 (+0000) Subject: roll back the broken unimport changes X-Git-Tag: 0_27~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5bee491da7a57755be1c6f528ec72e6ed45329eb;p=gitmo%2FMoose.git roll back the broken unimport changes --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 02e4c3c..3574c98 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -203,15 +203,13 @@ use Moose::Util::TypeConstraints; } ); - sub get_caller{ - return ref $_[1] && defined $_[1]->{into} ? $_[1]->{into} + + + sub import { + $CALLER = ref $_[1] && defined $_[1]->{into} ? $_[1]->{into} : ref $_[1] && defined $_[1]->{into_level} ? caller( $_[1]->{into_level} ) : caller(); - } - - sub import { - $CALLER = get_caller(@_); strict->import; warnings->import; @@ -226,7 +224,7 @@ use Moose::Util::TypeConstraints; sub unimport { no strict 'refs'; - my $class = get_caller(@_); + my $class = caller(); # loop through the exports ... foreach my $name ( keys %exports ) {