blib/lib/Heap/Simple/Less.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 6 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 10 | 11 | 90.9 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Heap::Simple::Less; | ||||||
2 | $VERSION = "0.02"; | ||||||
3 | 1 | 1 | 7 | use strict; | |||
1 | 2 | ||||||
1 | 146 | ||||||
4 | |||||||
5 | sub _ORDER_PREPARE { | ||||||
6 | 185 | 185 | 1656 | return "my \$order = \$heap->[0]{order};"; | |||
7 | } | ||||||
8 | |||||||
9 | sub _SMALLER { | ||||||
10 | 1073 | 1073 | 10667 | return "\$order->($_[1], $_[2])"; | |||
11 | } | ||||||
12 | |||||||
13 | sub order { | ||||||
14 | 242 | 242 | 0 | 32822 | return shift->[0]{order}; | ||
15 | } | ||||||
16 | |||||||
17 | 1; |