Exporter::Lite is an alternative to Exporter, intended to provide a lightweight subset of the most commonly-used functionality. It supports 'import()', '@EXPORT' and '@EXPORT_OK' and not a whole lot else.
Exporter::Lite simply exports its import() function into your namespace. This might be called a "mix-in" or a "role".
When 'Exporter::Lite' was written, if you wanted to use 'Exporter' you had to write something like this:
use Exporter; our @ISA = qw/ Exporter /;
'Exporter::Lite' saved you from writing that second line. But since before 2010 you've been able to write:
use Exporter qw/ import /;
Which imports the 'import' function into your namespace from 'Exporter'. As a result, I would recommend that you use 'Exporter' now, as it's a core module (shipped with Perl).
To make sure you get a version of 'Exporter' that supports the above usage, specify a minimum version when you 'use' it:
use Exporter 5.57 qw/ import /;
Package Version | Update ID | Released | Package Hub Version | Platforms | Subpackages |
---|---|---|---|---|---|
0.09-bp156.2.1 info | GA Release | 2023-07-22 | 15 SP6 |
|
|
0.09-bp155.1.4 info | GA Release | 2023-05-17 | 15 SP5 |
|
|
0.08-bp154.1.19 info | GA Release | 2022-05-09 | 15 SP4 |
|
|
0.08-bp153.1.16 info | GA Release | 2021-03-06 | 15 SP3 |
|
|
0.08-bp152.3.19 info | GA Release | 2020-04-16 | 15 SP2 |
|
|
0.08-bp151.3.1 info | GA Release | 2019-07-16 | 15 SP1 |
|
|
0.08-bp151.2.14 info | GA Release | 2019-05-18 | 15 SP1 |
|
|
0.08-bp150.2.4 info | GA Release | 2018-07-30 | 15 |
|
|