As the title states, I get this error when trying to use my perl module, but I have no idea what it means and I can't seem to find any clear results on the internet. My code consists of 3 files: a script (myApp.pl) which uses a module (MyLib.pm) which in turn uses another module (Secret.pm). Here they are in their entirety:
myApp.pl
#!/path/to/perl
my $version = "1.0.0";
use warnings;
use strict;
use Testing::MyLib;
MyLib.pm
package Testing::MyLib;
use strict;
use warnings;
use Testing::Secret;
Secret.pm
package Testing::Secret;
use strict;
use warnings;
use Exporter qw( import );
our @EXPORT = ();
our %EXPORT_TAGS = (
'all' => [ qw( MY_CONSTANT )]
);
our @EXPORT_OK = (
@{ $EXPORT_TAGS{all}}
);
use constant MY_CONSTANT => 'bla bla bla';
They exit in this file structure:
/bin/myApp.pl
/lib/perl/Testing/MyLib.pm
/lib/perl/Testing/Secret.pm
And the detail of the error message is:
[user@pc ~]$ myApp.pl
"import" is not exported by the Exporter module at /###/lib/perl/Testing/Secret.pm line 6
Can't continue after import errors at /###/lib/perl/Testing/Secret.pm line 6
BEGIN failed--compilation aborted at /###/lib/perl/Testing/Secret.pm line 6.
Compilation failed in require at /###/lib/perl/Testing/MyLib.pm line 6.
BEGIN failed--compilation aborted at /###/lib/perl/Testing/MyLib.pm line 6.
Compilation failed in require at /###/bin/myApp.pl line 7.
BEGIN failed--compilation aborted at /###/bin/myApp.pl line 7.