in reply to How to include a large number of constants?

At a previous job I used enum and a bit of symbol-table trickery:

package Constants; use base 'Exporter'; use enum qw(:C_ FOO, BAR, BAZ); our @EXPORT = grep /^C_/, %{__PACKAGE__ . "::"}; 1;