File Coverage

blib/lib/XML/Grammar/Fortune/Synd/Heap/Elem.pm
Criterion Covered Total %
statement 9 11 81.8
branch n/a
condition 0 3 0.0
subroutine 3 4 75.0
pod 1 1 100.0
total 13 19 68.4


line stmt bran cond sub pod time code
1             package XML::Grammar::Fortune::Synd::Heap::Elem;
2              
3 1     1   4339 use strict;
  1         2  
  1         30  
4 1     1   5 use warnings;
  1         2  
  1         40  
5              
6             =head1 NAME
7              
8             XML::Grammar::Fortune::Synd::Heap::Elem - heap element class for
9             XML::Grammar::Fortune::Synd. For internal use.
10              
11             =head1 VERSION
12              
13             Version 0.0211
14              
15             =cut
16              
17 1     1   5 use base 'Class::Accessor';
  1         2  
  1         217  
18              
19             our $VERSION = '0.0211';
20              
21             __PACKAGE__->mk_accessors(qw(
22             date
23             id
24             idx
25             file
26             ));
27              
28             # "All problems in computer science can be solved by
29             # adding another level of indirection;"
30             # -- http://en.wikipedia.org/wiki/Abstraction_layer
31             sub cmp
32             {
33 0     0 1   my ($self, $other) = @_;
34             return
35             (
36 0   0       ($self->date()->compare($other->date()))
37             ||
38             ($self->idx() <=> $other->idx())
39             )
40             ;
41             }
42              
43             1;
44              
45              
46             =head1 SYNOPSIS
47              
48             For internal use.
49              
50             =head1 FUNCTIONS
51              
52             =head2 cmp()
53              
54             Internal use.
55              
56             =head1 AUTHOR
57              
58             Shlomi Fish, C<< >>
59              
60             =head1 BUGS
61              
62             Please report any bugs or feature requests to C, or through
63             the web interface at L. I will be notified, and then you'll
64             automatically be notified of progress on your bug as I make changes.
65              
66              
67              
68              
69             =head1 SUPPORT
70              
71             You can find documentation for this module with the perldoc command.
72              
73             perldoc XML::Grammar::Fortune::Synd
74              
75              
76             You can also look for information at:
77              
78             =over 4
79              
80             =item * RT: CPAN's request tracker
81              
82             L
83              
84             =item * AnnoCPAN: Annotated CPAN documentation
85              
86             L
87              
88             =item * CPAN Ratings
89              
90             L
91              
92             =item * Search CPAN
93              
94             L
95              
96             =back
97              
98              
99             =head1 ACKNOWLEDGEMENTS
100              
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
109              
110             =cut
111