1 package LaTeX::TikZ::Interface;
8 LaTeX::TikZ::Interface - LaTeX::TikZ public interface register and loader.
16 our $VERSION = '0.01';
24 my ($name, $code) = splice @_, 0, 2;
26 unless (defined $name and $name =~ /^[a-z_][a-z0-9_]+$/i) {
28 Carp::confess('Invalid interface name');
31 if (do { no strict 'refs'; defined &{__PACKAGE__."::$name"} }) {
33 Carp::confess("'$name' is already defined in the interface");
36 unless (defined $code and ref $code eq 'CODE') {
38 Carp::confess('Invalid code reference');
41 Sub::Name::subname($name => $code);
45 *{__PACKAGE__.'::'.$name} = $code;
53 require LaTeX::TikZ::Formatter; # formatter
54 require LaTeX::TikZ::Functor; # functor
56 require LaTeX::TikZ::Set::Raw; # raw
58 require LaTeX::TikZ::Set::Path; # path
59 require LaTeX::TikZ::Set::Sequence; # seq
61 require LaTeX::TikZ::Set::Point; # point
62 require LaTeX::TikZ::Set::Line; # line
63 require LaTeX::TikZ::Set::Polyline; # polyline, closed_polyline
64 require LaTeX::TikZ::Set::Rectangle; # rectangle
65 require LaTeX::TikZ::Set::Circle; # circle
66 require LaTeX::TikZ::Set::Arc; # arc
67 require LaTeX::TikZ::Set::Arrow; # arrow
69 require LaTeX::TikZ::Mod::Raw; # raw_mod
71 require LaTeX::TikZ::Mod::Clip; # clip
72 require LaTeX::TikZ::Mod::Layer; # layer
74 require LaTeX::TikZ::Mod::Width; # width
75 require LaTeX::TikZ::Mod::Color; # color
76 require LaTeX::TikZ::Mod::Fill; # fill
77 require LaTeX::TikZ::Mod::Pattern; # pattern
82 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
84 You can contact me by mail or on C<irc.perl.org> (vincent).
88 Please report any bugs or feature requests to C<bug-latex-tikz at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LaTeX-TikZ>.
89 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
93 You can find documentation for this module with the perldoc command.
97 =head1 COPYRIGHT & LICENSE
99 Copyright 2010 Vincent Pit, all rights reserved.
101 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
105 1; # End of LaTeX::TikZ::Interface