summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-10 17:15:21 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-10 17:15:21 -0400
commit4fcfb4266551771b302eb4d4a3fcf40c7bffada8 (patch)
tree666abf7d91f6351b8c3c08a3bad95b23e8026107
parent5c9420df616f091d317fda0c0fce38359f736da6 (diff)
downloadexporter-lexical-4fcfb4266551771b302eb4d4a3fcf40c7bffada8.tar.gz
exporter-lexical-4fcfb4266551771b302eb4d4a3fcf40c7bffada8.zip
more docs
-rw-r--r--lib/Exporter/Lexical.pm27
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/Exporter/Lexical.pm b/lib/Exporter/Lexical.pm
index 633da52..48e4d72 100644
--- a/lib/Exporter/Lexical.pm
+++ b/lib/Exporter/Lexical.pm
@@ -55,6 +55,19 @@ sub import {
}
}
+=func build_exporter(\%opts[, $caller])
+
+ my $import Exporter::Lexical::build_exporter({
+ -exports => ['foo'],
+ });
+
+This function just creates the method that it would install as your package's
+C<import> method, without actually installing it. This lets you write your own
+import method that does whatever you want it to do, while still being able to
+export from it.
+
+=cut
+
sub build_exporter {
my ($opts, $caller) = @_;
$caller //= caller;
@@ -79,6 +92,14 @@ sub build_exporter {
};
}
+=func lexical_import($name, $sub)
+
+Installs C<$sub> as a lexical subroutine into the currently compiling lexical
+scope. Throws an error if there is no currently compiling lexical scope (for
+instance, if this is called at runtime).
+
+=cut
+
=head1 BUGS
No known bugs.
@@ -123,12 +144,6 @@ L<http://cpanratings.perl.org/d/Exporter-Lexical>
=back
-=begin Pod::Coverage
-
- lexical_import
-
-=end Pod::Coverage
-
=cut
1;