| 1 | # | ||
| 2 | # (c) Jan Gehring <jan.gehring@gmail.com> | ||
| 3 | # | ||
| 4 | |||
| 5 | package Rex::Helper::Misc; | ||
| 6 | |||
| 7 | 105 | ▶ | use v5.14.4; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 105 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 105 | our $VERSION = '1.16.1'; # VERSION | |
| 11 | |||
| 12 | 978 | ▶ | sub get_random { |
|
Subroutine
get_random: called CC=2 SCAR=6.9
Pod
undocumented
| |||
| 13 | 978 | my $count = shift; | |
| 14 | 978 | my @chars = @_; | |
| 15 | |||
| 16 | 978 | my $ret = ""; | |
| 17 | 978 | for ( 1 .. $count ) { | |
| 18 | 11729 | $ret .= $chars[ int( rand( scalar(@chars) - 1 ) ) ]; | |
| 19 | } | ||
| 20 | |||
| 21 | 978 | return $ret; | |
| 22 | } | ||
| 23 | |||
| 24 | 105 | 1; | |