Perinci::Exporter is an exporter which can utilize information from Rinci metadata. If your package has Rinci metadata, consider using this exporter for convenience and flexibility.
# most of the time, you only need to do this
Here are some key features of "Perinci::Exporter":
- List exportable routines from Rinci metadata
- All functions which have metadata are assumed to be exportable, so you do not have to list them again via @EXPORT or @EXPORT_OK.
- Read tags from Rinci metadata
- The exporter can read tags from your function metadata. You do not have to define export tags again.
- Export to different name
- See the 'as', 'prefix', 'suffix' import options of the install_import() function.
- Export wrapped function
- This allows importer to get additional/modified behavior. See Perinci::Sub::Wrapper for more about wrapping.
- Export differently wrapped function to different importers
- See some examples in "FAQ".
- Warn/bail on clash with existing function
- For testing or safety precaution.
- Read @EXPORT and @EXPORT_OK
- Perinci::Exporter reads these two package variables, so it is quite compatible with Exporter and Exporter::Lite. In fact, it is basically the same as Exporter::Lite if you do not have any metadata for your functions.