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.0214';
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.0214
47  
48 =head1 SYNOPSIS
49  
50 For internal use.
51  
52 =head1 FUNCTIONS
53  
54 =head2 cmp()
55  
56 Internal use.
57  
58 =head1 AUTHOR
59  
60 Shlomi Fish, C<< <shlomif at cpan.org> >>
61  
62 =head1 BUGS
63  
64 Please report any bugs or feature requests to C<bug-xml-grammar-fortune-synd at rt.cpan.org>, or through
65 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
66 automatically be notified of progress on your bug as I make changes.
67  
68 =head1 SUPPORT
69  
70 You can find documentation for this module with the perldoc command.
71  
72 perldoc XML::Grammar::Fortune::Synd
73  
74 You can also look for information at:
75  
76 =over 4
77  
78 =item * RT: CPAN's request tracker
79  
80 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-Grammar-Fortune-Synd>
81  
82 =item * AnnoCPAN: Annotated CPAN documentation
83  
84 L<http://annocpan.org/dist/XML-Grammar-Fortune-Synd>
85  
86 =item * CPAN Ratings
87  
88 L<http://cpanratings.perl.org/d/XML-Grammar-Fortune-Synd>
89  
90 =item * Search CPAN
91  
92 L<http://search.cpan.org/dist/XML-Grammar-Fortune-Synd>
93  
94 =back
95  
96 =head1 ACKNOWLEDGEMENTS
97  
98 =head1 COPYRIGHT & LICENSE
99  
100 Copyright 2008 Shlomi Fish, all rights reserved.
101  
102 This program is released under the following license: MIT/X11 License
103  
104 L<http://www.opensource.org/licenses/mit-license.php>
105  
106 =head1 AUTHOR
107  
108 Shlomi Fish <shlomif@cpan.org>
109  
110 =head1 COPYRIGHT AND LICENSE
111  
112 This software is Copyright (c) 2019 by Shlomi Fish.
113  
114 This is free software, licensed under:
115  
116 The MIT (X11) License
117  
118 =head1 BUGS
119  
120 Please report any bugs or feature requests on the bugtracker website
121 L<https://github.com/shlomif/fortune-xml/issues>
122  
123 When submitting a bug or request, please include a test-file or a
124 patch to an existing test-file that illustrates the bug or desired
125 feature.
126  
127 =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
128  
129 =head1 SUPPORT
130  
131 =head2 Perldoc
132  
133 You can find documentation for this module with the perldoc command.
134  
135 perldoc XML::Grammar::Fortune::Synd::Heap::Elem
136  
137 =head2 Websites
138  
139 The following websites have more information about this module, and may be of help to you. As always,
140 in addition to those websites please use your favorite search engine to discover more resources.
141  
142 =over 4
143  
144 =item *
145  
146 MetaCPAN
147  
148 A modern, open-source CPAN search engine, useful to view POD in HTML format.
149  
150 L<https://metacpan.org/release/XML-Grammar-Fortune-Synd>
151  
152 =item *
153  
154 Search CPAN
155  
156 The default CPAN search engine, useful to view POD in HTML format.
157  
158 L<http://search.cpan.org/dist/XML-Grammar-Fortune-Synd>
159  
160 =item *
161  
162 RT: CPAN's Bug Tracker
163  
164 The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
165  
166 L<https://rt.cpan.org/Public/Dist/Display.html?Name=XML-Grammar-Fortune-Synd>
167  
168 =item *
169  
170 AnnoCPAN
171  
172 The AnnoCPAN is a website that allows community annotations of Perl module documentation.
173  
174 L<http://annocpan.org/dist/XML-Grammar-Fortune-Synd>
175  
176 =item *
177  
178 CPAN Ratings
179  
180 The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
181  
182 L<http://cpanratings.perl.org/d/XML-Grammar-Fortune-Synd>
183  
184 =item *
185  
186 CPANTS
187  
188 The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
189  
190 L<http://cpants.cpanauthors.org/dist/XML-Grammar-Fortune-Synd>
191  
192 =item *
193  
194 CPAN Testers
195  
196 The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
197  
198 L<http://www.cpantesters.org/distro/X/XML-Grammar-Fortune-Synd>
199  
200 =item *
201  
202 CPAN Testers Matrix
203  
204 The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
205  
206 L<http://matrix.cpantesters.org/?dist=XML-Grammar-Fortune-Synd>
207  
208 =item *
209  
210 CPAN Testers Dependencies
211  
212 The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
213  
214 L<http://deps.cpantesters.org/?module=XML::Grammar::Fortune::Synd>
215  
216 =back
217  
218 =head2 Bugs / Feature Requests
219  
220 Please report any bugs or feature requests by email to C<bug-xml-grammar-fortune-synd at rt.cpan.org>, or through
221 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
222 progress on the request by the system.
223  
224 =head2 Source Code
225  
226 The code is open to the world, and available for you to hack on. Please feel free to browse it and play
227 with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
228 from your repository :)
229  
230 L<https://github.com/shlomif/fortune-xml>
231  
232 git clone git://github.com/shlomif/fortune-xml.git
233  
234 =cut
« Build ↑ Summary blib/lib/XML/Grammar/Fortune/Synd/App.pm »