to calling C<build_import_methods> with C<< install => [qw(import unimport
init_meta)] >> except that it doesn't also return the methods.
-The C<import> method is built using L<Sub::Exporter>.
-It can take a hashref of the form C<{into=>$package}> to specify the package
+The C<import> method is built using L<Sub::Exporter>. This means that it can
+take a hashref of the form C<< { into => $package } >> to specify the package
it operates on.
Used by C<setup_import_methods>.
...
- # If you don't use goto you have to specify into.
- $class->$import({into=>caller},...);
+ # You can either pass an explicit package to import into ...
+ $class->$import({ into => scalar(caller) }, ...);
...
}
+ # ... or you can use 'goto' to provide the correct caller info to the
+ # generated method
sub unimport { goto &$unimport }
sub init_meta {