I have a module similar to this one in "lib" called Fool.pm, which is based on the source code of CGI.pm (since it was the first module that I thought of when I thought about exporting tags):
package Fool;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw/raspberry/;
%EXPORT_TAGS = (
':all' => \@EXPORT_OK,
);
1;
and a test script as follows:
use lib 'lib';
use Fool qw/:all/;
I am trying to run a script and get the following:
perl fool.pl
"all" is not defined in %Fool::EXPORT_TAGS at fool.pl line 2
main::BEGIN() called at lib/Fool.pm line 2
eval {...} called at lib/Fool.pm line 2
Can't continue after import errors at fool.pl line 2
BEGIN failed--compilation aborted at fool.pl line 2.
I donβt see what mistake is here, can anyone help?
user181548
source
share