tobyink / p5-type-tiny

Perl 5 distribution Type-Tiny; see homepage for downloads and documentation.
https://typetiny.toby.ink/
54 stars 48 forks source link

Type::Library should handle enum types specially and provide a `-constants` export tag #114

Closed tobyink closed 2 years ago

tobyink commented 2 years ago

Extracting this issue from #109.

If adding a type Foo which is an Enum or has an Enum as its last constraining type to a type library, the type library should provide FOO_BAR and FOO_BAZ constants as exports.

They should probably also be included in the +Foo export.

This relates to #113.

tobyink commented 2 years ago

Should all work now, but would be good to check that +Foo really picks up the exported constants.