ActiveState Powered by ActiveState

ActiveState Community


How do you export an enum?

Posted by rvanes on 2007-11-29 06:32

I just recently discovered the enum.pl Perl module and I would like to use it as well as be able to export an enum. Does anybody know how I would do that?

Let's say I have the following:

package test;

use strict;
use enum qw(Sun Mon Tue Wed Thu Fri Sat);
use Exporter;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
# @EXPORT = ?????

How can I assign something to @EXPORT so that an enum is available outside of the test module?

-->