| 1 | package Articulate::Sortation::String; | ||
| 2 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 2 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | 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<Articulate::Role::Sortation::AllYouNeedIsCmp> | ||
| 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<Articulate::Role::Sortation::AllYouNeedIsCmp>. | ||
| 21 | |||
| 22 | =head3 cmp | ||
| 23 | |||
| 24 | $self->cmp($a, $b); # returns $a cmp $b | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | 10 | ▶ | sub cmp { |
|
Subroutine
cmp: called CC=1 SCAR=0.0
Pod
documented
| |||
| 29 | 10 | my $self = shift; | |
| 30 | 10 | return ( $_[0] cmp $_[1] ); | |
| 31 | } | ||
| 32 | |||
| 33 | =head1 SEE ALSO | ||
| 34 | |||
| 35 | =over | ||
| 36 | |||
| 37 | =item * L<Articulate::Sortation::Slug> | ||
| 38 | |||
| 39 | =item * L<Articulate::Sortation::Numeric> | ||
| 40 | |||
| 41 | =back | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | 2 | 1; | |