From 5c566c64a8f798f2aabdba58594f01f398ee1e40 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 10 Jul 2013 17:31:18 -0400 Subject: and more docs --- lib/Exporter/Lexical.pm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 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 method into your module, +which will handle the exporting process as configured by the import args. + =cut use XSLoader; @@ -66,6 +82,11 @@ C 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, 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 { -- cgit v1.2.3-54-g00ecf