X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FAPI.pm;fp=lib%2FLaTeX%2FTikZ%2FAPI.pm;h=0000000000000000000000000000000000000000;hb=5adf00c880491bac3bd793a07431cf161c03643f;hp=46fe198c5df5dc5a792d56c4e625c48348966a83;hpb=e955781895f97b6ff7ec50270466d459c992e4e1;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/API.pm b/lib/LaTeX/TikZ/API.pm deleted file mode 100644 index 46fe198..0000000 --- a/lib/LaTeX/TikZ/API.pm +++ /dev/null @@ -1,104 +0,0 @@ -package LaTeX::TikZ::API; - -use strict; -use warnings; - -=head1 NAME - -LaTeX::TikZ::API - LaTeX::TikZ public API register and loader. - -=head1 VERSION - -Version 0.01 - -=cut - -our $VERSION = '0.01'; - -use Sub::Name (); - -sub import { - shift; - - register(@_); -} - -sub register { - while (@_ >= 2) { - my ($name, $code) = splice @_, 0, 2; - - unless (defined $name and $name =~ /^[a-z_][a-z0-9_]+$/i) { - require Carp; - Carp::confess('Invalid interface name'); - } - - if (do { no strict 'refs'; defined &{__PACKAGE__."::$name"} }) { - require Carp; - Carp::confess("'$name' is already defined in the interface"); - } - - unless (defined $code and ref $code eq 'CODE') { - require Carp; - Carp::confess('Invalid code reference'); - } - - Sub::Name::subname($name => $code); - - { - no strict 'refs'; - *{__PACKAGE__.'::'.$name} = $code; - } - } - - return; -} - -sub load { - require LaTeX::TikZ::Formatter; # formatter - - require LaTeX::TikZ::Set::Raw; # raw - - require LaTeX::TikZ::Set::Path; # path - require LaTeX::TikZ::Set::Sequence; # seq - - require LaTeX::TikZ::Set::Point; # point - require LaTeX::TikZ::Set::Line; # line - require LaTeX::TikZ::Set::Rectangle; # rectangle - require LaTeX::TikZ::Set::Circle; # circle - - require LaTeX::TikZ::Mod::Raw; # raw_mod - - require LaTeX::TikZ::Mod::Clip; # clip - require LaTeX::TikZ::Mod::Layer; # layer - - require LaTeX::TikZ::Mod::Width; # width - require LaTeX::TikZ::Mod::Color; # color - require LaTeX::TikZ::Mod::Fill; # fill -} - -=head1 AUTHOR - -Vincent Pit, C<< >>, L. - -You can contact me by mail or on C (vincent). - -=head1 BUGS - -Please report any bugs or feature requests to C, or through the web interface at L. -I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. - -=head1 SUPPORT - -You can find documentation for this module with the perldoc command. - - perldoc LaTeX::TikZ - -=head1 COPYRIGHT & LICENSE - -Copyright 2010 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. - -=cut - -1; # End of LaTeX::TikZ::API