From: Jesse Luehrs Date: Mon, 25 Jul 2011 16:24:01 +0000 (-0500) Subject: clean up the moose::exporter doc additions a bit X-Git-Tag: 2.0202~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=061d9dc002aa4c5e88a0358e69c5c601b564f7bd;p=gitmo%2FMoose.git clean up the moose::exporter doc additions a bit --- diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index cf1e6d7..91f7846 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -783,8 +783,8 @@ C, and C. Calling C is equivalent to calling C with C<< install => [qw(import unimport init_meta)] >> except that it doesn't also return the methods. -The C method is built using L. -It can take a hashref of the form C<{into=>$package}> to specify the package +The C method is built using L. This means that it can +take a hashref of the form C<< { into => $package } >> to specify the package it operates on. Used by C. @@ -822,12 +822,14 @@ C: ... - # 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 {