1 package LaTeX::TikZ::API;
8 LaTeX::TikZ::API - LaTeX::TikZ public API register and loader.
16 our $VERSION = '0.01';
28 my ($name, $code) = splice @_, 0, 2;
30 unless (defined $name and $name =~ /^[a-z_][a-z0-9_]+$/i) {
32 Carp::confess('Invalid interface name');
35 if (do { no strict 'refs'; defined &{__PACKAGE__."::$name"} }) {
37 Carp::confess("'$name' is already defined in the interface");
40 unless (defined $code and ref $code eq 'CODE') {
42 Carp::confess('Invalid code reference');
45 Sub::Name::subname($name => $code);
49 *{__PACKAGE__.'::'.$name} = $code;
57 require LaTeX::TikZ::Set::Mod;
59 require LaTeX::TikZ::Set::Raw; # raw
61 require LaTeX::TikZ::Set::Path; # path
62 require LaTeX::TikZ::Set::Sequence; # seq
64 require LaTeX::TikZ::Set::Point; # point
65 require LaTeX::TikZ::Set::Line; # line
66 require LaTeX::TikZ::Set::Rectangle; # rectangle
67 require LaTeX::TikZ::Set::Circle; # circle
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
81 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
83 You can contact me by mail or on C<irc.perl.org> (vincent).
87 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>.
88 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
92 You can find documentation for this module with the perldoc command.
96 =head1 COPYRIGHT & LICENSE
98 Copyright 2010 Vincent Pit, all rights reserved.
100 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
104 1; # End of LaTeX::TikZ::API