Instead, create a subtype and coerce that:
- subtype 'My.ArrayRef' => as 'ArrayRef';
+ subtype 'My::ArrayRef' => as 'ArrayRef';
- coerce 'My.ArrayRef'
+ coerce 'My::ArrayRef'
=> from 'Str'
=> via { [ split /,/ ] };
Instead, we can create an "empty" subtype for the coercion:
- subtype 'My.HTTP::Headers' => as class_type('HTTP::Headers');
+ subtype 'My::HTTP::Headers' => as class_type('HTTP::Headers');
- coerce 'My.HTTP::Headers'
+ coerce 'My::HTTP::Headers'
=> from 'HashRef'
=> via { HTTP::Headers->new( %{$_} ) };