| 1 | package Acme::NameGen; | ||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use 5.006; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||
| 7 | 1 | our $VERSION = '0.010000'; | |||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use vars qw($VERSION @EXPORT_OK); | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 10 | 1 | require Exporter; | |||||||||||||||||||||||||||||||||||||
| 11 | 1 | *import = \&Exporter::import; | |||||||||||||||||||||||||||||||||||||
| 12 | 1 | @EXPORT_OK = qw(gen gen_lc gen_uc); | |||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||
| 14 | 1 | my @adjectives = ( | |||||||||||||||||||||||||||||||||||||
| 15 | 'admiring', 'adoring', 'affectionate', 'agitated', | ||||||||||||||||||||||||||||||||||||||
| 16 | 'amazing', 'angry', 'awesome', 'blissful', | ||||||||||||||||||||||||||||||||||||||
| 17 | 'boring', 'brave', 'clever', 'cocky', | ||||||||||||||||||||||||||||||||||||||
| 18 | 'compassionate', 'competent', 'condescending', 'confident', | ||||||||||||||||||||||||||||||||||||||
| 19 | 'cranky', 'dazzling', 'determined', 'distracted', | ||||||||||||||||||||||||||||||||||||||
| 20 | 'dreamy', 'eager', 'ecstatic', 'elastic', | ||||||||||||||||||||||||||||||||||||||
| 21 | 'elated', 'elegant', 'eloquent', 'epic', | ||||||||||||||||||||||||||||||||||||||
| 22 | 'fervent', 'festive', 'flamboyant', 'focused', | ||||||||||||||||||||||||||||||||||||||
| 23 | 'friendly', 'frosty', 'gallant', 'gifted', | ||||||||||||||||||||||||||||||||||||||
| 24 | 'goofy', 'gracious', 'happy', 'hardcore', | ||||||||||||||||||||||||||||||||||||||
| 25 | 'heuristic', 'hopeful', 'hungry', 'infallible', | ||||||||||||||||||||||||||||||||||||||
| 26 | 'inspiring', 'jolly', 'jovial', 'keen', | ||||||||||||||||||||||||||||||||||||||
| 27 | 'kind', 'laughing', 'loving', 'lucid', | ||||||||||||||||||||||||||||||||||||||
| 28 | 'mystifying', 'modest', 'musing', 'naughty', | ||||||||||||||||||||||||||||||||||||||
| 29 | 'nervous', 'nifty', 'nostalgic', 'objective', | ||||||||||||||||||||||||||||||||||||||
| 30 | 'optimistic', 'peaceful', 'pedantic', 'pensive', | ||||||||||||||||||||||||||||||||||||||
| 31 | 'practical', 'priceless', 'quirky', 'quizzical', | ||||||||||||||||||||||||||||||||||||||
| 32 | 'relaxed', 'reverent', 'romantic', 'sad', | ||||||||||||||||||||||||||||||||||||||
| 33 | 'serene', 'sharp', 'silly', 'sleepy', | ||||||||||||||||||||||||||||||||||||||
| 34 | 'stoic', 'stupefied', 'suspicious', 'tender', | ||||||||||||||||||||||||||||||||||||||
| 35 | 'thirsty', 'trusting', 'unruffled', 'upbeat', | ||||||||||||||||||||||||||||||||||||||
| 36 | 'vibrant', 'vigilant', 'vigorous', 'wizardly', | ||||||||||||||||||||||||||||||||||||||
| 37 | 'wonderful', 'xenodochial', 'youthful', 'zealous', | ||||||||||||||||||||||||||||||||||||||
| 38 | 'zen' | ||||||||||||||||||||||||||||||||||||||
| 39 | ); | ||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||
| 41 | sub gen { | ||||||||||||||||||||||||||||||||||||||
| 42 | 6 | ▶ | my ( $adjective_element, $subjects, $subjects_element ) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
gen: called CC=3 SCAR=14.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 43 | 6 | ▶ | $adjectives[ $adjective_element || rand scalar @adjectives ] . '_' | ||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$adjective_element || rand scalar @adjectives
$subjects_element || rand scalar @$subjects
MC/DC0%0/2
$adjective_element || rand scalar @adjectives
$adjective_element
rand scalar @adjectives
MC/DC0%0/2
$subjects_element || rand scalar @$subjects
$subjects_element
rand scalar @$subjects
Truth table33%1/3
A || B
A= $adjective_elementB= rand scalar @adjectives
Truth table33%1/3
A || B
A= $subjects_elementB= rand scalar @$subjects
| |||||||||||||||||||||||||||||||||||||||
| 44 | . $subjects->[ $subjects_element || rand scalar @$subjects ]; | ||||||||||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||
| 47 | 2 | ▶ | sub gen_lc { lc gen(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
gen_lc: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||
| 49 | 2 | ▶ | sub gen_uc { uc gen(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
gen_uc: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||
| 51 | 1 | 1; | |||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||
| 53 | __END__ | ||||||||||||||||||||||||||||||||||||||