X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FFunctor%2FRule.pm;h=58ef3600aadeaca82637074ad9689d11cd3bf5fd;hb=4f696c03a66ef6b52ee7b9b3c74a71d5abc64f7e;hp=88e30db44f3a847ef181c2808bb5c70968549f82;hpb=cfe1f7a0b769c771181f2cb0d3d8f16a1dac7ad7;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Functor/Rule.pm b/lib/LaTeX/TikZ/Functor/Rule.pm index 88e30db..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>. @@ -242,7 +255,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.