Constants are just subs. You can export them like any other sub
package Constants; use strict; use warnings; use Exporter; our @ISA = 'Exporter'; my %constants; BEGIN { %constants = ( FOO => 1, BAR => 1, ); } use constant \%constants; our @EXPORT = keys(%constants); 1;
In reply to Re: Wish I could include global constants
by ikegami
in thread Wish I could include global constants
by maryfranan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |