Hello,

I am trying to create a module that exports a few subroutines in the script that uses it.
This is OK, very simple to do using Exporter.

But I also want that module to export strict and warnings.

If I don't use Exporter in the module, I can make it to export strict and warnings, using something like:

sub import { strict->import; warnings->import; }

This way I don't need to write use strict; use warnings; in the scripts that uses this module.

But if in that module I use both Exporter and
sub import { strict->import; warnings->import; }
than the exporter doesn't export the subroutines I specified in @EXPORT array.

Do you know if there is a way of exporting both strict and warnings feature and also export some subroutines?

Thanks.

--Octavian


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to