X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FMeta%2FTypeConstraint%2FAutocoerce.pm;h=d8f074d003aa651db6f5e8584fb42e1ff3ebb309;hb=e079ad00277a8e64c40d2cc1eb0a7e538e7e2c8e;hp=dca3e69a36aab47468811f7586c376435a176105;hpb=3661d7849ae4636b74000e33e068493d90ed8337;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm b/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm index dca3e69..d8f074d 100644 --- a/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm +++ b/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm @@ -9,11 +9,11 @@ LaTeX::TikZ::Meta::TypeConstraint::Autocoerce - Type constraint metaclass that a =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 SYNOPSIS @@ -142,7 +142,13 @@ my $target_tc = __PACKAGE__->meta->find_attribute_by_name('target') =head1 METHODS -=head2 C<< new name => $name, mapper => $mapper, target => $target >> +=head2 C + + my $tc = LaTeX::TikZ::Meta::TypeConstraint::Autocoerce->new( + name => $name, + mapper => $mapper, + target => $target, + ); Constructs a type constraint object that will attempt to autocoerce objects that are not valid according to C<$target> by loading the class returned by C<$mapper>. @@ -178,7 +184,9 @@ around 'new' => sub { return $class->$orig(%args); }; -=head2 C +=head2 C + + $tc->coerce($thing) Tries to coerce C<$thing> by first loading a class that might contain a type coercion for it. @@ -248,7 +256,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2010 Vincent Pit, all rights reserved. +Copyright 2010,2011,2012,2013,2014,2015 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.