| 1 | package Heap::Elem::Ref; | ||
| 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: RefElem (to allocate a new Heap::Elem::Ref value) | ||
| 15 | 1 | @EXPORT_OK = qw( RefElem ); | |
| 16 | |||
| 17 | 1 | $VERSION = '0.80'; | |
| 18 | |||
| 19 | 0 | ▶ | sub RefElem { # exportable synonym for new |
|
Subroutine
RefElem: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 20 | 0 | Heap::Elem::Ref->new(@_); | |
| 21 | } | ||
| 22 | |||
| 23 | # compare two Ref elems - the objects must have a compatible cmp method | ||
| 24 | 0 | ▶ | sub cmp { |
|
Subroutine
cmp: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 25 | 0 | return $_[0][0]->cmp( $_[1][0] ); | |
| 26 | } | ||
| 27 | |||
| 28 | 1 | 1; | |
| 29 | __END__ | ||