X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FFunctor%2FRule.pm;h=58ef3600aadeaca82637074ad9689d11cd3bf5fd;hb=4f696c03a66ef6b52ee7b9b3c74a71d5abc64f7e;hp=81b57355435fa408bea7bada1a7cee8bd651588c;hpb=062ab95259610ce39ace60365b659d6113420ce7;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Functor/Rule.pm b/lib/LaTeX/TikZ/Functor/Rule.pm index 81b5735..58ef360 100644 --- a/lib/LaTeX/TikZ/Functor/Rule.pm +++ b/lib/LaTeX/TikZ/Functor/Rule.pm @@ -9,11 +9,11 @@ LaTeX::TikZ::Functor::Rule - An object that specifies how functors should handle =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 DESCRIPTION @@ -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>.