Streamlined module exports set-up for simplified usage.
Exported is used to indicate that the associated subroutine or global variable must be exported automatically. This attribute also goes into the :all tag depending on the rules set by %EXPORT_TAGS. Any tags you specify as options of this attribute will be available as well. For instance, declaring sub hello : Exported(greet,uk) { ... } will export hello() and make it available in :all, :greet, and :uk tags.
On the other hand, Exportable is similar to Exported, but the associated subroutine or global variable will not be automatically exported. However, it will still be available in the :all tag and all other tags specified as attribute options.
When using Exporter::Simple, the export definitions are kept with the subroutines and variables instead of having to worry about what goes in @EXPORT, @EXPORT_OK and %EXPORT_TAGS. This means that Exporter::Simple frees you from the implementation details of Exporter.
In the SYNOPSIS, you can see how easy it is to define exports using Exporter::Simple. In the example, the package MyExport uses the base 'Exporter::Simple', and exports @bar, $foo, and $z with the Exported and Exportable attributes. It also defines three subroutines, hello, askme, and hi, with Exported and Exportable attributes as well.
Finally, in a separate module, you can use MyExport and specify the :greet tag to make hello() available. You can also print hello() and add a value to a variable.
Overall, Exporter::Simple is an excellent module that makes defining exports a lot easier, keeping the export definitions with the subroutines and variables, and freeing you from the details of Exporter.
Version 1.10: N/A