]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm
This is 0.03
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Meta / TypeConstraint / Autocoerce.pm
index b1d85079376c935b12593aedda98822c1dd88e9b..d8f074d003aa651db6f5e8584fb42e1ff3ebb309 100644 (file)
@@ -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<new>
+
+    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<coerce $thing>
+=head2 C<coerce>
+
+    $tc->coerce($thing)
 
 Tries to coerce C<$thing> by first loading a class that might contain a type coercion for it.