Heap/Elem/Str.pm

filter: Statementstmt 78.9% 15 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 50.0% 1 / 2 totaltotal 73.0% 19 / 26 CC 1 SCAR 3.4
CC
1
Cov
79%
StrElem
2.0
cmp
2.0
BEGIN
1.0
CRAP 1.4
« Heap/Elem.pm ↑ Summary Heap/Elem/StrRev.pm »
1 package Heap::Elem::Str;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Heap::Elem;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 require Exporter;
8  
9 1 @ISA = qw(Exporter Heap::Elem);
10  
11 # No names exported.
12 1 @EXPORT = ( );
13  
14 # Available for export: StrElem (to allocate a new Heap::Elem::Str value)
15 1 @EXPORT_OK = qw( StrElem );
16  
17 1 $VERSION = '0.80';
18  
19 0 ▶sub StrElem { # exportable synonym for new
Subroutine StrElem: not called CC=1 SCAR=6.9
Pod undocumented
20 0 Heap::Elem::Str->new(@_);
21 }
22  
23 # compare two Str elems
24 0 ▶sub cmp {
Subroutine cmp: not called CC=1 SCAR=6.9
Pod documented
25 0 my $self = shift;
26 0 my $other = shift;
27 0 return $_[0][0] cmp $_[1][0];
28 }
29  
30 1 1;
31 __END__
« Heap/Elem.pm ↑ Summary Heap/Elem/StrRev.pm »