Skip to content

Latest commit

 

History

History
262 lines (145 loc) · 7.83 KB

Alpha.pod

File metadata and controls

262 lines (145 loc) · 7.83 KB

NAME

Random::Alpha returns a random letter of the English alphabet.

VERSION

This document describes Random::Alpha version 1.000.

SYNOPSIS

use Random::Alpha qw(random_alpha);

my $upper_case       = random_alpha('upper case');       # returns an uppercase letter
my $lower_case       = random_alpha('lower case');       # returns a lowercase letter
my $upper_consonant  = random_alpha('upper consonants'); # returns an uppercase consonent
my $lower_consonant  = random_alpha('lower consonants'); # returns a lowercase consonent
my $upper_vowel      = random_alpha('upper vowels');     # returns an uppercase vowel
my $lower_vowel      = random_alpha('lower vowels');     # returns a lowercase vowel
my $ascender         = random_alpha('ascenders');        # returns a b, d, f, h, k, l, or t
my $descender        = random_alpha('descenders');       # returns a g, j, p, q, or y
my $arch             = random_alpha('arches');           # returns an h, m, or n
my $upper_bowl       = random_alpha{'upper bowls');      # returns a B, D, O, P, or Q
my $lower_bowl       = random_alpha{'lower bowls');      # returns a b, d, o, p, or q
my $upper_bar        = random_alpha('upper bars');       # returns an A, E, F, or H
my $lower_bar        = random_alpha('lower bars');       # returns an e, f, or t
my $dot              = random_alpha('dots');             # returns an i or j

my $Greek_named      = random_alpha('Greek named');      # returns a Greek letter spelled out
my $Greek_upper      = random_alpha('Greek upper');      # returns a Greek uppercase letter
my $Greek_lower      = random_alpha('Greek lower');      # returns a Greek lowercase letter
my $Greek_upper_ce   = random_alpha('Greek upper ce');   # returns a Greek uppercase letter HTML character entity
my $Greek_lower_ce   = random_alpha('Greek lower ce');   # returns a Greek lowercase letter HTML character entity

my $Hebrew_named     = random_alpha('Hebrew named');     # returns a Hebrew letter spelled out
my $Hebrew_letter    = random_alpha('Hebrew letters');   # returns a Hebrew letter
my $Bebrew_final     = random_alpha{'Hewbrew finals'};   # returns a Hebrew letter for the final position
my $Hebrew_ce        = random_alpha('Hebrew ce');        # returns a Hebrew letter character entity
my $Hebrew_final_ce  = random_alpha('Hebrew finals ce'); # returns a Hebrew letter character entity for the final position

print random_alpha('help') # get random_alpha options

DESCRIPTION

Random::Alpha returns a random letter of the English alphabet from whichever group you choose. The Greek option is an outlier that returns a random Greek letter spelled out.

random_alpha

Options

nothing, all, or undef

random_alpha;
random_alpha();
random_alpha('all');
random_alpha(undef);

These options will return any value in any list. You can read the options below to see all of the potential values.

upper case

random_alpha('upper case');

The upper option returns any uppercase letter in the English alphabet.

lower case

random_alpha('lower case');

The lower option returns any lowercase letter in the English alphabet.

upper consonents

random_alpha('upper consonents');

The upper consonents option returns a B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, Z, Y, or Z.

lower consonents

random_alpha('lower consonents');

The lower consonents option returns a b, c, d, f, g, h, j, k, l, m, n, p, q, r, s, t, v, w, z, y, or z.

upper vowels

random_alpha('upper vowels');

The upper vowels option returns am A, E, I, O, or U.

lower vowels

random_alpha('lower vowels');

The lower vowels option returns an a, e, i, o, or u.

ascenders

random_alpha('ascenders');

The ascenders option returns a b, d, f, h, k, l, or t.

descenders

random_alpha('descenders');

The descenders option returns a g, j, p, q, or y.

arches

random_alpha('arches');

The arches option returns an h, m, or n.

upper bowls

random_alpha('upper bowls');

The upper bowls option returns a B, D, O, P, or Q.

lower bowls

random_alpha('lower bowls');

The lower bowls option returns a b, d, o, p, or q.

upper bars

random_alpha('upper bars');

The upper bars option returns an A, E, F, or H.

lower bars

random_alpha('lower bars');

The lower bars option returns an e, f, or t.

dots

random_alpha('dots');

The dots option returns an i or j.

Greek named

random_alpha('Greek named');

The Greek named option returns Alpha, Beta, Gamma, Delta, Epsilon, Digamma, Zeta, Eta, Theta, Iota, Kappa, Lambda, Mu, Nu, Xi, Omicron, Pi, San, Qoppa, Rho, Sigma, Tau, Upsilon, Phi, Chi, Psi, Omega, or Sampi.

Greek upper

random_alpha('Greek upper');

The Greek upper option returns Α , Β , Γ , Δ , Ε , Ζ , Η , Θ , Ι , Κ , Λ , Μ , � , Ξ , Ο , Π , Ρ , Σ , Τ , Υ , Φ , Χ , Ψ , or Ω .

Greek lower

random_alpha('Greek lower');

The Greek lower option returns α , β , γ , δ , ε , ζ , η , θ , ϑ , ι , κ , λ , μ , ν , ξ , ο , π , ϖ , � , ς , σ , τ , υ ϒ , φ , χ , ψ , or ω .

Greek upper ce

random_alpha('Greek upper ce');

The Greek named option returns an HTML character entity for a random Greek uppercase letter.

Greek lower ce

random_alpha('Greek lower ce');

The Greek named option returns an HTML character entity for a random Greek lowercase letter.

Hebrew named

random_alpha('Hebrew named');

The Hebrew named option returns Alef, Bet, Gimel, Dalet, He, Vav, Zayin, Het, Tet, Yod, Kaf, Lamed, Mem, Nun, Samekh, Ayin, Pe, Tsadi, Qof, Resh, Shin, or Tav.

Hewbrew letters

random_alpha('Hebrew letters');

The Hebrew letters option returns �, ב, ג, ד, ה, ו, ז, ח, ט, י, כ, ל, מ, נ, ס, ע, פ, צ, ק, ר, ש, ת, װ, ױ, or ײ.

Hebrew finals

random_alpha{'Hebrew finals'};

The Hebrew fianls option returns �, ב, ג, ד, ה, ו, ז, ח, ט, י, ך, ל, �, ן, ס, ע, ף, ץ, ק, ר, ש, ת, װ, ױ, or ײ.

Hebrew ce

random_alpha('Hebrew ce');

The Hebrerw ce option returns an HTML character entity for a random Hebrew letter.

Hebrew final ce

random_alpha('Hebrew finals ce');

The Hebrew finals ce returns an HTML character entity for a random Hebrew letter in the final position.

by keys

random_alpha('by keys');

The by keys option returns a random key listed above.

keys

random_alpha('keys');

The keys option will list all of the available keys in an array reference.

data

random_alpha('data');

The data option will return the data used in a hash reference.

help or options

random_alpha('help');
random_alpha('options');

The help or options options will return a list of all of your options.

Adding items to a list

You can add items to the list by adding an array reference with the additional items as the second parameter.

my @additions = ('letter 1', 'letter 2');
random_alpha('<your option>', \@additions);

So using the above, you could add the semivowels, or glides, to the list of vowels.

my @semivowels = ('W', 'Y');
random_alpha('upper vowels', \@semivowels);

DEPENDENCIES

Random::Alpha depends on Fancy::Rand, Fancy::Open, File::ShareDir, and Exporter.

ACKNOWLEDGMENTS

Over the years I have gotten a lot of help writing Perl from the PerlMonks community. I have gotten a great deal of their help over the years. So, thank you PerlMonks!

AUTHOR

Lady Aleena

LICENSE AND COPYRIGHT

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

Copyright © 2020, Lady Aleena (aleena@cpan.org). All rights reserved.