are basically the same asuse Module; -and- use Module qw( ... );
BEGIN { require Module; Module->import(); } -and- BEGIN { require Module; Module->import(qw( ... )); }
Your module doesn't have an import method, so the modules in @ISA are searched for one. Both CGI and Exporter have an import function, so the one that will be called will be controlled by the order of the classes in @ISA.
If you want Exporter's import, put Exporter early enough in @ISA or add the following to your module:
{ no warnings 'once'; *import = \&Exporter::import; }
(For what it's worth, I've always thought Exporter's reliance on inheritance is dumb.)
In reply to Re: Exporter (sometimes) doesn't seem to export if it's not first in @ISA
by ikegami
in thread Exporter (sometimes) doesn't seem to export if it's not first in @ISA
by mcdave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |