X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FFunctor.pm;h=f02ae40c0a6a31a294bcf328f9b6dbaab810b080;hb=4f696c03a66ef6b52ee7b9b3c74a71d5abc64f7e;hp=bba3d5edae520a6392731ca087ece57bed7bdfe9;hpb=062ab95259610ce39ace60365b659d6113420ce7;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Functor.pm b/lib/LaTeX/TikZ/Functor.pm index bba3d5e..f02ae40 100644 --- a/lib/LaTeX/TikZ/Functor.pm +++ b/lib/LaTeX/TikZ/Functor.pm @@ -9,11 +9,11 @@ LaTeX::TikZ::Functor - Build functor methods that recursively visit nodes of a L =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 DESCRIPTION @@ -80,7 +80,11 @@ BEGIN { =head1 METHODS -=head2 C<< new rules => [ $spec1 => $handler1, $spec2 => $handler2, ... ] >> +=head2 C + + my $functor = LaTeX::TikZ::Functor->new( + rules => [ $spec1 => $handler1, $spec2 => $handler2, ... ], + ); Creates a new functor object that will use both the default and the user-specified rules. The functor is also a code reference that expects to be called against L objects. @@ -204,7 +208,9 @@ LaTeX::TikZ::Interface->register( }, ); -=head2 C<< default_rule $spec => $handler >> +=head2 C + + LaTeX::TikZ::Functor->default_rule($spec => $handler) Adds to all subsequently created functors a default rule for the class or role C<$spec>.