X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FFunctor%2FRule.pm;fp=lib%2FLaTeX%2FTikZ%2FFunctor%2FRule.pm;h=7c55061b4de8e5fd2dd4bf4cc10c09e2bc204a54;hp=81b57355435fa408bea7bada1a7cee8bd651588c;hb=61a93a58351bf2d238dcf81a1a557112b0c0ee85;hpb=062ab95259610ce39ace60365b659d6113420ce7 diff --git a/lib/LaTeX/TikZ/Functor/Rule.pm b/lib/LaTeX/TikZ/Functor/Rule.pm index 81b5735..7c55061 100644 --- a/lib/LaTeX/TikZ/Functor/Rule.pm +++ b/lib/LaTeX/TikZ/Functor/Rule.pm @@ -85,7 +85,12 @@ my $ltfrl_tc = subtype 'LaTeX::TikZ::Functor::RuleList' =head1 METHODS -=head2 C<< new target => $target, handler => $handler >> +=head2 C + + my $rule = LaTeX::TikZ::Functor::Rule->new( + target => $target, + handler => $handler, + ); Constructs a new rule object with target C<$target> and handler C<$handler>. @@ -120,7 +125,13 @@ around 'BUILDARGS' => sub { $class->$orig(%args); }; -=head2 C<< insert into => \@list, overwrite => $overwrite, replace => $replace >> +=head2 C + + my $has_replaced = $rule->insert( + into => \@list, + overwrite => $overwrite, + replace => $replace, + ); Inserts the current rule into the list of rules C<@list>. The list is expected to be ordered, in that each rule must come after all the rules that have a target that inherits or consumes the original rule's own target. @@ -205,7 +216,9 @@ sub insert { return 0; } -=head2 C +=head2 C + + $rule->handles($obj); Returns true if and only if the current rule can handle the object or class/role name C<$obj>.