our $VERSION = '0.01';
+=head1 DESCRIPTION
+
+A functor takes a L<LaTeX::TikZ::Set> tree and clones it according to certain rules.
+
+=cut
+
use Carp ();
use Sub::Name ();
}
Carp::confess("Invalid handler for target $target")
- unless ref $handler eq 'CODE';
+ unless defined $handler and ref $handler eq 'CODE';
return [ $target, $handler, $is_set ];
});
});
}
+=head1 METHODS
+
+=head2 C<default_rule>
+
+=cut
+
sub default_rule {
shift;
$insert_rule->($rule, $rule->[2] ? \@default_set_rules : \@default_mod_rules);
}
+=head2 C<< new rules => [ $class_name => sub { ... }, ... ] >>
+
+=cut
+
sub new {
my ($class, %args) = @_;
},
);
+=head1 SEE ALSO
+
+L<LaTeX::TikZ>.
+
=head1 AUTHOR
Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.