| 1 | package Langertha::Role::Seed; | ||
| 2 | # ABSTRACT: Role for an engine that can set a seed | ||
| 3 | 57 | our $VERSION = '0.505'; | |
| 4 | 57 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 57 | ▶ | use Carp qw( croak ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 57 | has randomize_seed => ( | |
| 8 | is => 'ro', | ||
| 9 | lazy_build => 1, | ||
| 10 | ); | ||
| 11 | 80 | ▶ | sub _build_randomize_seed { 0 } |
|
Subroutine
_build_randomize_seed: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | |||
| 14 | 57 | has seed => ( | |
| 15 | is => 'ro', | ||
| 16 | predicate => 'has_seed', | ||
| 17 | ); | ||
| 18 | |||
| 19 | |||
| 20 | 0 | ▶ | sub random_seed { |
|
Subroutine
random_seed: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 21 | 0 | return sprintf("%u",rand(100_000_000)); | |
| 22 | } | ||
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | 57 | 1; | |
| 27 | |||
| 28 | __END__ | ||