From: Dave Rolsky Date: Fri, 17 Feb 2012 17:37:27 +0000 (-0600) Subject: Fix a var name that's always confused me. X-Git-Tag: v0.32~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Types.git;a=commitdiff_plain;h=5c3e47c7cf6e85aebff0ac06a454a54f66b3106f Fix a var name that's always confused me. The caller() is the $caller, not the $callee. --- diff --git a/lib/MooseX/Types.pm b/lib/MooseX/Types.pm index 8d769ba..e5047fd 100644 --- a/lib/MooseX/Types.pm +++ b/lib/MooseX/Types.pm @@ -335,7 +335,7 @@ helper functions you will need to declare your types. sub import { my ($class, %args) = @_; - my $callee = caller; + my $caller = caller; # everyone should want this strict->import; @@ -343,7 +343,7 @@ sub import { # inject base class into new library { no strict 'refs'; - unshift @{ $callee . '::ISA' }, 'MooseX::Types::Base'; + unshift @{ $caller . '::ISA' }, 'MooseX::Types::Base'; } # generate predeclared type helpers @@ -357,18 +357,18 @@ sub import { if $type =~ /::/; # add type to library and remember to export - $callee->add_type($type); + $caller->add_type($type); push @to_export, $type; } - $callee->import({ -full => 1, -into => $callee }, @to_export); + $caller->import({ -full => 1, -into => $caller }, @to_export); } # run type constraints import - Moose::Util::TypeConstraints->import({ into => $callee }); + Moose::Util::TypeConstraints->import({ into => $caller }); # override some with versions that check for syntax errors - MooseX::Types::CheckedUtilExports->import({ into => $callee }); + MooseX::Types::CheckedUtilExports->import({ into => $caller }); 1; }