line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Articulate::Sortation::String; |
2
|
2
|
|
|
2
|
|
1258
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
61
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
40
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
6
|
use Moo; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
9
|
|
6
|
|
|
|
|
|
|
with 'Articulate::Role::Sortation::AllYouNeedIsCmp'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Articulate::Sortation::String - sort strings using perl cmp |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
This implements the L |
15
|
|
|
|
|
|
|
role to provide a very basic string sorter object |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 METHODS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
One method provided here, the rest are as in |
20
|
|
|
|
|
|
|
L. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head3 cmp |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$self->cmp($a, $b); # returns $a cmp $b |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub cmp { |
29
|
10
|
|
|
10
|
1
|
45
|
my $self = shift; |
30
|
10
|
|
|
|
|
42
|
return ( $_[0] cmp $_[1] ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SEE ALSO |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=over |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item * L |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item * L |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=back |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |