X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FFunctor.pm;h=344816438038170d7a7f5668f9929fc14b67ade9;hp=8c97432f2c57e1f7df9712b6cced21c4ffff30ef;hb=e6c6fbca8df4f8df7bbce2eb98dd260ed51d9141;hpb=fcf49f47b7655e0bc3ed8c3da7f1004cbb70c7a5 diff --git a/lib/LaTeX/TikZ/Functor.pm b/lib/LaTeX/TikZ/Functor.pm index 8c97432..3448164 100644 --- a/lib/LaTeX/TikZ/Functor.pm +++ b/lib/LaTeX/TikZ/Functor.pm @@ -15,6 +15,12 @@ Version 0.01 our $VERSION = '0.01'; +=head1 DESCRIPTION + +A functor takes a L tree and clones it according to certain rules. + +=cut + use Carp (); use Sub::Name (); @@ -76,6 +82,12 @@ BEGIN { }); } +=head1 METHODS + +=head2 C + +=cut + sub default_rule { shift; @@ -84,6 +96,10 @@ sub default_rule { $insert_rule->($rule, $rule->[2] ? \@default_set_rules : \@default_mod_rules); } +=head2 C<< new rules => [ $class_name => sub { ... }, ... ] >> + +=cut + sub new { my ($class, %args) = @_;