summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-10 17:31:18 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-10 17:31:18 -0400
commit5c566c64a8f798f2aabdba58594f01f398ee1e40 (patch)
tree4a7c4ec60e01a286548bcef681d3e0e622ae8545
parentaa3f08493d04303e253459eeb8182d8352984ace (diff)
downloadexporter-lexical-5c566c64a8f798f2aabdba58594f01f398ee1e40.tar.gz
exporter-lexical-5c566c64a8f798f2aabdba58594f01f398ee1e40.zip
and more docs
-rw-r--r--lib/Exporter/Lexical.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Exporter/Lexical.pm b/lib/Exporter/Lexical.pm
index 5714dca..af19558 100644
--- a/lib/Exporter/Lexical.pm
+++ b/lib/Exporter/Lexical.pm
@@ -28,6 +28,22 @@ This module is quite experimental, and may change a lot in the future as I
figure out how it should work. It is very much a proof of concept for the
moment.
+This module takes a hash of C<import> args as configuration, with these keys:
+
+=over 4
+
+=item -exports
+
+The value of this key can either be an arrayref, in which case the elements of
+the arrayref will be treated as function names to look for in the current
+package and export, or a hashref, in which case the keys will be function names
+and the values will be coderefs.
+
+=back
+
+Importing this module will also install an C<import> method into your module,
+which will handle the exporting process as configured by the import args.
+
=cut
use XSLoader;
@@ -66,6 +82,11 @@ 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.
+This function takes a hashref of arguments which correspond to the arguments
+you would pass to C<import>, followed by an optional package name to get the
+subs from, if you're exporting subs by name. The default is to get the subs
+from the calling package.
+
=cut
sub build_exporter {