X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FImport-Into.git;a=blobdiff_plain;f=lib%2FImport%2FInto.pm;h=84effea2d8164d5a4bb159361c69d75e33c4e82d;hp=a421fe7e901c515fb68563459de96ef180f553e0;hb=6e5223e6c0c3bdaf61ecd4ec09f875aa57d45dff;hpb=74957c98290a59f0e2166dd57144dad64d17f2aa diff --git a/lib/Import/Into.pm b/lib/Import/Into.pm index a421fe7..84effea 100644 --- a/lib/Import/Into.pm +++ b/lib/Import/Into.pm @@ -3,7 +3,7 @@ package Import::Into; use strict; use warnings FATAL => 'all'; -our $VERSION = '1.001001'; # 1.1.1 +our $VERSION = '1.002002'; # 1.2.2 sub _prelude { my $target = shift; @@ -85,9 +85,8 @@ Import::Into - import packages into other packages Thing1->unimport::out_of(scalar caller); } -You don't need to do anything more clever than this provided you -document that people wanting to re-export your module should also be using -L. +People wanting to re-export your module should also be using L. +Any exporter or pragma will work seamlessly. Note: You do B need to make any changes to Thing1 to be able to call C on it. This is a global method, and is callable on any @@ -215,7 +214,7 @@ in the directive then need to be fetched using C: $sub->($thing, @import_args); And you need to switch between these implementations depending on if you are -targetting a specific package, or something in your call stack. +targeting a specific package, or something in your call stack. Remembering all this, however, is excessively irritating. So I wrote a module so I didn't have to anymore. Loading L creates a global method @@ -263,6 +262,11 @@ you're receiving this from a parameter, I recommend using L: And that's it. +=head1 SEE ALSO + +I gave a lightning talk on this module (and L and L) at +L. + =head1 ACKNOWLEDGEMENTS Thanks to Getty for asking "how can I get C<< use strict; use warnings; >>