blib/lib/XML/Grammar/Fortune/Synd/Heap/Elem.pm

filter: Statementstmt 85.7% 12 / 14 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 66.6% 16 / 24 CC 2 SCAR 11.0
CC
2
Cov
71%
cmp
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Build ↑ Summary blib/lib/XML/Grammar/Fortune/Synd/App.pm »
1 package XML::Grammar::Fortune::Synd::Heap::Elem;
2 2 $XML::Grammar::Fortune::Synd::Heap::Elem::VERSION = '0.0212';
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6  
7 2 ▶use parent 'Class::Accessor';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 __PACKAGE__->mk_accessors(qw(
10 date
11 id
12 idx
13 file
14 ));
15  
16 # "All problems in computer science can be solved by
17 # adding another level of indirection;"
18 # -- http://en.wikipedia.org/wiki/Abstraction_layer
19 sub cmp
20 {
21 0 ▶ my ($self, $other) = @_;
Subroutine cmp: not called CC=2 SCAR=17.9
Pod documented
22 return
23 (
24 0 ▶ ($self->date()->compare($other->date()))
Condition0%0/3
$self->date->compare($other->date) || $self->idx <=> $other->idx
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->date->compare($other->date) || $self->idx <=> $other->idx
$self->date->compare($other->date) $self->idx <=> $other->idx
Truth table0%0/3
A || B
A= $self->date->compare($other->date)B= $self->idx <=> $other->idx
ABresult
1X1
011
000
25 ||
26 ($self->idx() <=> $other->idx())
27 )
28 ;
29 }
30  
31 2 1;
32  
33 __END__
34  
35 =pod
36  
37 =encoding UTF-8
38  
39 =head1 NAME
40  
41 XML::Grammar::Fortune::Synd::Heap::Elem - heap element class for
42 XML::Grammar::Fortune::Synd. For internal use.
43  
44 =head1 VERSION
45  
46 version 0.0212
47  
48 =head1 SYNOPSIS
49  
50 For internal use.
51  
52 =head1 VERSION
53  
54 version 0.0212
55  
56 =head1 FUNCTIONS
57  
58 =head2 cmp()
59  
60 Internal use.
61  
62 =head1 AUTHOR
63  
64 Shlomi Fish, C<< <shlomif at cpan.org> >>
65  
66 =head1 BUGS
67  
68 Please report any bugs or feature requests to C<bug-xml-grammar-fortune-synd at rt.cpan.org>, or through
69 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-Grammar-Fortune-Synd>. I will be notified, and then you'll
70 automatically be notified of progress on your bug as I make changes.
71  
72 =head1 SUPPORT
73  
74 You can find documentation for this module with the perldoc command.
75  
76 perldoc XML::Grammar::Fortune::Synd
77  
78 You can also look for information at:
79  
80 =over 4
81  
82 =item * RT: CPAN's request tracker
83  
84 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-Grammar-Fortune-Synd>
85  
86 =item * AnnoCPAN: Annotated CPAN documentation
87  
88 L<http://annocpan.org/dist/XML-Grammar-Fortune-Synd>
89  
90 =item * CPAN Ratings
91  
92 L<http://cpanratings.perl.org/d/XML-Grammar-Fortune-Synd>
93  
94 =item * Search CPAN
95  
96 L<http://search.cpan.org/dist/XML-Grammar-Fortune-Synd>
97  
98 =back
99  
100 =head1 ACKNOWLEDGEMENTS
101  
102 =head1 COPYRIGHT & LICENSE
103  
104 Copyright 2008 Shlomi Fish, all rights reserved.
105  
106 This program is released under the following license: MIT/X11 License
107  
108 L<http://www.opensource.org/licenses/mit-license.php>
109  
110 =head1 AUTHOR
111  
112 Shlomi Fish <shlomif@cpan.org>
113  
114 =head1 COPYRIGHT AND LICENSE
115  
116 This software is Copyright (c) 2018 by Shlomi Fish.
117  
118 This is free software, licensed under:
119  
120 The MIT (X11) License
121  
122 =head1 BUGS
123  
124 Please report any bugs or feature requests on the bugtracker website
125 L<https://github.com/shlomif/xml-grammar-fortune-synd/issues>
126  
127 When submitting a bug or request, please include a test-file or a
128 patch to an existing test-file that illustrates the bug or desired
129 feature.
130  
131 =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
132  
133 =head1 SUPPORT
134  
135 =head2 Perldoc
136  
137 You can find documentation for this module with the perldoc command.
138  
139 perldoc XML::Grammar::Fortune::Synd::Heap::Elem
140  
141 =head2 Websites
142  
143 The following websites have more information about this module, and may be of help to you. As always,
144 in addition to those websites please use your favorite search engine to discover more resources.
145  
146 =over 4
147  
148 =item *
149  
150 MetaCPAN
151  
152 A modern, open-source CPAN search engine, useful to view POD in HTML format.
153  
154 L<https://metacpan.org/release/XML-Grammar-Fortune-Synd>
155  
156 =item *
157  
158 Search CPAN
159  
160 The default CPAN search engine, useful to view POD in HTML format.
161  
162 L<http://search.cpan.org/dist/XML-Grammar-Fortune-Synd>
163  
164 =item *
165  
166 RT: CPAN's Bug Tracker
167  
168 The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
169  
170 L<https://rt.cpan.org/Public/Dist/Display.html?Name=XML-Grammar-Fortune-Synd>
171  
172 =item *
173  
174 AnnoCPAN
175  
176 The AnnoCPAN is a website that allows community annotations of Perl module documentation.
177  
178 L<http://annocpan.org/dist/XML-Grammar-Fortune-Synd>
179  
180 =item *
181  
182 CPAN Ratings
183  
184 The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
185  
186 L<http://cpanratings.perl.org/d/XML-Grammar-Fortune-Synd>
187  
188 =item *
189  
190 CPANTS
191  
192 The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
193  
194 L<http://cpants.cpanauthors.org/dist/XML-Grammar-Fortune-Synd>
195  
196 =item *
197  
198 CPAN Testers
199  
200 The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
201  
202 L<http://www.cpantesters.org/distro/X/XML-Grammar-Fortune-Synd>
203  
204 =item *
205  
206 CPAN Testers Matrix
207  
208 The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
209  
210 L<http://matrix.cpantesters.org/?dist=XML-Grammar-Fortune-Synd>
211  
212 =item *
213  
214 CPAN Testers Dependencies
215  
216 The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
217  
218 L<http://deps.cpantesters.org/?module=XML::Grammar::Fortune::Synd>
219  
220 =back
221  
222 =head2 Bugs / Feature Requests
223  
224 Please report any bugs or feature requests by email to C<bug-xml-grammar-fortune-synd at rt.cpan.org>, or through
225 the web interface at L<https://rt.cpan.org/Public/Bug/Report.html?Queue=XML-Grammar-Fortune-Synd>. You will be automatically notified of any
226 progress on the request by the system.
227  
228 =head2 Source Code
229  
230 The code is open to the world, and available for you to hack on. Please feel free to browse it and play
231 with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
232 from your repository :)
233  
234 L<https://github.com/shlomif/xml-grammar-fortune-synd>
235  
236 git clone https://bitbucket.org/shlomif/fortune-xml
237  
238 =cut
« Build ↑ Summary blib/lib/XML/Grammar/Fortune/Synd/App.pm »