]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blob - lib/LaTeX/TikZ.pm
fc0c0940f33cc1aa7bb72552b9d35c9278a06b01
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ.pm
1 package LaTeX::TikZ;
2
3 use strict;
4 use warnings;
5
6 =head1 NAME
7
8 LaTeX::TikZ - Perl object model for generating PGF/TikZ code.
9
10 =head1 VERSION
11
12 Version 0.01
13
14 =cut
15
16 our $VERSION = '0.01';
17
18 use LaTeX::TikZ::Interface;
19
20 sub import {
21  shift;
22
23  my %args = @_;
24  my $name = $args{as};
25  $name = 'Tikz' unless defined $name;
26  unless ($name =~ /^[a-z_][a-z0-9_]*$/i) {
27   require Carp;
28   Carp::confess('Invalid name');
29  }
30
31  my $pkg   = caller;
32  my $const = sub () { 'LaTeX::TikZ::Interface' };
33  {
34   no strict 'refs';
35   *{$pkg . '::' . $name} = $const;
36  }
37
38  LaTeX::TikZ::Interface->load;
39
40  return;
41 }
42
43 =head1 AUTHOR
44
45 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
46
47 You can contact me by mail or on C<irc.perl.org> (vincent).
48
49 =head1 BUGS
50
51 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>.
52 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
53
54 =head1 SUPPORT
55
56 You can find documentation for this module with the perldoc command.
57
58     perldoc LaTeX::TikZ
59
60 =head1 COPYRIGHT & LICENSE
61
62 Copyright 2010 Vincent Pit, all rights reserved.
63
64 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
65
66 =cut
67
68 1; # End of LaTeX::TikZ