| 1 | package Sort::Sub::by_rand; | ||
| 2 | |||
| 3 | 3 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 3 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 8 | 3 | our $DATE = '2024-07-17'; # DATE | |
| 9 | 3 | our $DIST = 'Sort-Sub'; # DIST | |
| 10 | 3 | our $VERSION = '0.121'; # VERSION | |
| 11 | |||
| 12 | 1 | ▶ | sub meta { |
|
Subroutine
meta: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 13 | return { | ||
| 14 | 1 | v => 1, | |
| 15 | summary => "Sort randomly using Perl's rand()", | ||
| 16 | }; | ||
| 17 | } | ||
| 18 | |||
| 19 | 1 | ▶ | sub gen_sorter { |
|
Subroutine
gen_sorter: called CC=1 SCAR=0.4
Pod
undocumented
| |||
| 20 | 1 | my ($is_reverse, $is_ci) = @_; | |
| 21 | |||
| 22 | 0 | ▶ | sub { int(3*rand())-1 }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 23 | } | ||
| 24 | |||
| 25 | 3 | 1; | |
| 26 | # ABSTRACT: Sort randomly using Perl's rand() | ||
| 27 | |||
| 28 | __END__ | ||