File Coverage

blib/lib/LaTeX/TikZ/Set/Path.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 16 16 100.0


line stmt bran cond sub pod time code
1             package LaTeX::TikZ::Set::Path;
2              
3 10     10   3180 use strict;
  10         10  
  10         251  
4 10     10   30 use warnings;
  10         9  
  10         338  
5              
6             =head1 NAME
7              
8             LaTeX::TikZ::Set::Path - A role for set objects that can be part of a path.
9              
10             =head1 VERSION
11              
12             Version 0.03
13              
14             =cut
15              
16             our $VERSION = '0.03';
17              
18             =head1 DESCRIPTION
19              
20             Paths are all the elements against which we can call the C method.
21              
22             =cut
23              
24 10     10   35 use Mouse::Role;
  10         8  
  10         41  
25              
26             =head1 RELATIONSHIPS
27              
28             This role consumes the L role, and as such implements the L method.
29              
30             =cut
31              
32             with 'LaTeX::TikZ::Set';
33              
34             =head1 METHODS
35              
36             These methods are required by the interface :
37              
38             =over 4
39              
40             =item *
41              
42             C
43              
44             Returns the TikZ code that builds a path out of the current set object as a string formatted by the L object C<$formatter>.
45             The current evaluation context is passed as the L object C<$context>.
46              
47             =item *
48              
49             C
50              
51             Returns a L object pointing to the beginning of the path, or C if this path has no beginning.
52              
53             =item *
54              
55             C
56              
57             A L object pointing to the end of the path, or C if this path has no end.
58              
59             =back
60              
61             =cut
62              
63             requires qw<
64             path
65             begin
66             end
67             >;
68              
69             =head2 C
70              
71             =cut
72              
73             sub draw {
74 212     212 1 210 my $set = shift;
75              
76 212         519 [ "\\draw " . $set->path(@_) . ' ;' ];
77             }
78              
79             =head1 SEE ALSO
80              
81             L, L.
82              
83             =head1 AUTHOR
84              
85             Vincent Pit, C<< >>, L.
86              
87             You can contact me by mail or on C (vincent).
88              
89             =head1 BUGS
90              
91             Please report any bugs or feature requests to C, or through the web interface at L.
92             I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
93              
94             =head1 SUPPORT
95              
96             You can find documentation for this module with the perldoc command.
97              
98             perldoc LaTeX::TikZ
99              
100             =head1 COPYRIGHT & LICENSE
101              
102             Copyright 2010,2011,2012,2013,2014,2015 Vincent Pit, all rights reserved.
103              
104             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
105              
106             =cut
107              
108             1; # End of LaTeX::TikZ::Set::Path;