I have a module something like this, in "lib", called Fool.pm, which is based on the source code of CGI.pm (since that was the first module I thought of when I was thinking about exporting tags):
package Fool;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw/raspberry/;
%EXPORT_TAGS = (
':all' => \@EXPORT_OK,
);
1;
and a test script like this:
use lib 'lib';
use Fool qw/:all/;
I try to run the 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 can't see what the mistake is here, can anyone help?