From: Dave Rolsky Date: Wed, 6 Aug 2008 19:06:22 +0000 (+0000) Subject: Tidy this method X-Git-Tag: 0_55_01~43^2~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=24fb5d6529b0afc6cf9289a2d964ed83f524f1f1;p=gitmo%2FMoose.git Tidy this method --- diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index 2fad886..9c33377 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -8,16 +8,16 @@ use namespace::clean 0.08 (); use Sub::Exporter; -sub get_caller{ - # 1 extra level because it's called by import so there's a layer of indirection +sub get_caller { + # 1 extra level because it's called by import so there's a layer + # of indirection my $offset = 1; return - (ref $_[1] && defined $_[1]->{into}) - ? $_[1]->{into} - : (ref $_[1] && defined $_[1]->{into_level}) - ? caller($offset + $_[1]->{into_level}) - : caller($offset); + ( ref $_[1] && defined $_[1]->{into} ) ? $_[1]->{into} + : ( ref $_[1] && defined $_[1]->{into_level} ) + ? caller( $offset + $_[1]->{into_level} ) + : caller($offset); } my %EXPORT_SPEC;