use ArrayRef for enum declaration for compatibility with Moose >2.1100

Fixes RT#90782