enum conf => [qw /access input/]; enum version => [qw /1 2/]; and I like to have subtype 'FileName', as 'Str', where { /(access|input).(1|2).txt/ }; and then has filename => (is => 'rw', isa=> 'FileName');