We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The docs for Type::Tiny::constraint_generator state:
Type::Tiny::constraint_generator
Coderef that is called when a type constraint is parameterized. When called, it is passed the list of parameters,
And the docs for Type::Tiny::coercion_generator state:
Type::Tiny::coercion_generator
Called with the same parameters and package variables as the "constraint_generator".
However, it's actually called as
$code->( $self, $child_type, @args )
I.E.
1163 $P = $self->create_child_type( %options ); 1164 1165 if ( $self->has_coercion_generator ) { 1166 my @args = @_; 1167 $P->{_build_coercion} = sub { 1168 my $coercion = shift; 1169 my $built = $self->coercion_generator->( $self, $P, @args ); 1170 $coercion->add_type_coercions( @{ $built->type_coercion_map } ) if $built; 1171 $coercion->freeze; 1172 }; 1173 }
The text was updated successfully, but these errors were encountered:
Mistake in title (fixed): it's coercion_generator, not constraint_generator.
Sorry, something went wrong.
No branches or pull requests
The docs for
Type::Tiny::constraint_generator
state:And the docs for
Type::Tiny::coercion_generator
state:However, it's actually called as
I.E.
The text was updated successfully, but these errors were encountered: