}
);
- sub import {
- $CALLER =
- ref $_[1] && defined $_[1]->{into} ? $_[1]->{into}
+ sub get_caller{
+ return 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;
sub unimport {
no strict 'refs';
- my $class = caller();
+ my $class = get_caller(@_);
# loop through the exports ...
foreach my $name ( keys %exports ) {