| 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__ | ||