p5-type-tiny icon indicating copy to clipboard operation
p5-type-tiny copied to clipboard

Document that Type::Tiny "coercion" attribute accepts arrayref to be passed to add_type_coercions

Open djerius opened this issue 1 year ago • 0 comments

Version 2.00400.

Peering at the code, it looks like

my $type = Type::Tiny->new( ..., coercion => [ $type, $coderef ...] )

is accepted, and is equivalent to

my $type = Type::Tiny->new( ...); $type->add_type_coercions( $type, $coderef, ... );

If this is intended as part of the API, it'd be great to have it documented as such.

Thanks!

Diab

djerius avatar Jan 05 '24 15:01 djerius