| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package LaTeX::TikZ::Interface; |
|
2
|
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
58
|
use strict; |
|
|
10
|
|
|
|
|
20
|
|
|
|
10
|
|
|
|
|
338
|
|
|
4
|
10
|
|
|
10
|
|
55
|
use warnings; |
|
|
10
|
|
|
|
|
19
|
|
|
|
10
|
|
|
|
|
417
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
LaTeX::TikZ::Interface - LaTeX::TikZ public interface register and loader. |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.02 |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
10
|
|
|
10
|
|
7968
|
use Sub::Name (); |
|
|
10
|
|
|
|
|
118892
|
|
|
|
10
|
|
|
|
|
2177
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 METHODS |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 C<< register $keyword => $code >> |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Registers C<$code> to be available with C<< Tikz->$keyword >>. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub register { |
|
29
|
197
|
|
|
197
|
1
|
16015
|
shift; |
|
30
|
|
|
|
|
|
|
|
|
31
|
197
|
|
|
|
|
757
|
while (@_ >= 2) { |
|
32
|
208
|
|
|
|
|
678
|
my ($name, $code) = splice @_, 0, 2; |
|
33
|
|
|
|
|
|
|
|
|
34
|
208
|
100
|
100
|
|
|
2142
|
unless (defined $name and $name =~ /^[a-z_][a-z0-9_]+$/i) { |
|
35
|
2
|
|
|
|
|
21
|
require Carp; |
|
36
|
2
|
|
|
|
|
440
|
Carp::confess('Invalid interface name'); |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
10
|
100
|
|
10
|
|
80
|
if (do { no strict 'refs'; defined &{__PACKAGE__."::$name"} }) { |
|
|
10
|
|
|
|
|
20
|
|
|
|
10
|
|
|
|
|
1252
|
|
|
|
206
|
|
|
|
|
278
|
|
|
|
206
|
|
|
|
|
260
|
|
|
|
206
|
|
|
|
|
1810
|
|
|
40
|
1
|
|
|
|
|
9
|
require Carp; |
|
41
|
1
|
|
|
|
|
178
|
Carp::confess("'$name' is already defined in the interface"); |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
205
|
100
|
100
|
|
|
1200
|
unless (defined $code and ref $code eq 'CODE') { |
|
45
|
3
|
|
|
|
|
21
|
require Carp; |
|
46
|
3
|
|
|
|
|
569
|
Carp::confess('Invalid code reference'); |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
202
|
|
|
|
|
1214
|
Sub::Name::subname($name => $code); |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
{ |
|
52
|
10
|
|
|
10
|
|
58
|
no strict 'refs'; |
|
|
10
|
|
|
|
|
21
|
|
|
|
10
|
|
|
|
|
2798
|
|
|
|
202
|
|
|
|
|
283
|
|
|
53
|
202
|
|
|
|
|
5121
|
*{__PACKAGE__.'::'.$name} = $code; |
|
|
202
|
|
|
|
|
1580
|
|
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
191
|
|
|
|
|
455
|
return; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 C<load> |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Load all the modules of the L<LaTeX::TikZ> official suite that register a keyword in the interface. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub load { |
|
67
|
11
|
|
|
11
|
1
|
6215
|
require LaTeX::TikZ::Formatter; # formatter |
|
68
|
11
|
|
|
|
|
9043
|
require LaTeX::TikZ::Functor; # functor |
|
69
|
|
|
|
|
|
|
|
|
70
|
11
|
|
|
|
|
6663
|
require LaTeX::TikZ::Set::Raw; # raw |
|
71
|
|
|
|
|
|
|
|
|
72
|
11
|
|
|
|
|
6126
|
require LaTeX::TikZ::Set::Path; # path |
|
73
|
11
|
|
|
|
|
6276
|
require LaTeX::TikZ::Set::Sequence; # seq |
|
74
|
|
|
|
|
|
|
|
|
75
|
11
|
|
|
|
|
6331
|
require LaTeX::TikZ::Set::Point; # point |
|
76
|
11
|
|
|
|
|
5703
|
require LaTeX::TikZ::Set::Line; # line |
|
77
|
11
|
|
|
|
|
6638
|
require LaTeX::TikZ::Set::Polyline; # polyline, closed_polyline |
|
78
|
11
|
|
|
|
|
6021
|
require LaTeX::TikZ::Set::Rectangle; # rectangle |
|
79
|
11
|
|
|
|
|
6282
|
require LaTeX::TikZ::Set::Circle; # circle |
|
80
|
11
|
|
|
|
|
6460
|
require LaTeX::TikZ::Set::Arc; # arc |
|
81
|
11
|
|
|
|
|
6394
|
require LaTeX::TikZ::Set::Arrow; # arrow |
|
82
|
|
|
|
|
|
|
|
|
83
|
11
|
|
|
|
|
5951
|
require LaTeX::TikZ::Mod::Raw; # raw_mod |
|
84
|
|
|
|
|
|
|
|
|
85
|
11
|
|
|
|
|
97
|
require LaTeX::TikZ::Mod::Clip; # clip |
|
86
|
11
|
|
|
|
|
53
|
require LaTeX::TikZ::Mod::Layer; # layer |
|
87
|
|
|
|
|
|
|
|
|
88
|
11
|
|
|
|
|
6580
|
require LaTeX::TikZ::Mod::Width; # width |
|
89
|
11
|
|
|
|
|
6411
|
require LaTeX::TikZ::Mod::Color; # color |
|
90
|
11
|
|
|
|
|
6025
|
require LaTeX::TikZ::Mod::Fill; # fill |
|
91
|
11
|
|
|
|
|
6136
|
require LaTeX::TikZ::Mod::Pattern; # pattern |
|
92
|
|
|
|
|
|
|
} |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
L<LaTeX::TikZ>. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 AUTHOR |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
You can contact me by mail or on C<irc.perl.org> (vincent). |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 BUGS |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
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>. |
|
107
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 SUPPORT |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
perldoc LaTeX::TikZ |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Copyright 2010 Vincent Pit, all rights reserved. |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
1; # End of LaTeX::TikZ::Interface |