Random::GemMetalJewelry returns a random gem, metal, or piece of jewelry.
This document describes Random::GemsMetalJewelry version 1.000.
use Random::GemMetalJewelry qw(
random_gem_variety
random_gem_color
random_gem_cut
random_gem
random_metal
random_gem_expanded
random_jewelry
);
# random_gem_variety usage
my $gem_variety = random_gem_variety('all'); # returns a random gem or metal
my $unsorted_gem = random_gem_variety('unsorted');
my $beryl_gem = random_gem_variety('beryl');
my $chalcedony_gem = random_gem_variety('chalcedony');
my $corundum_gem = random_gem_variety('corundum');
my $quartz_gem = random_gem_variety('quartz');
my $organic_gem = random_gem_variety('organic');
my $metal = random_gem_variety('metal');
print random_gem_variety('help'); # get random_gem_variety options
# random_gem_color usage
my $gem_color = random_gem_color('all'); # returns a random gem color
my $diamond_color = random_gem_color('diamond');
my $garnet_color = random_gem_color('garnet');
my $sapphire_color = random_gem_color('sapphire');
my $spinel_color = random_gem_color('spinel');
my $topaz_color = random_gem_color('topaz');
my $gold_color = random_gem_color('gold');
print random_gem_color('help'); # get random_gem_color options
# random_gem_cut usage
my $gem_cut = random_gem_cut('all'); # returns a random gem cut
my $brilliant_cut = random_gem_cut('brilliant');
my $fancy_cut = random_gem_cut('fancy');
my $mixed_cut = random_gem_cut('mixed');
my $step_cut = random_gem_cut('step');
my $other_cut = random_gem_cut('other');
print random_gem_cut('help'); # get random_gem_cut options
# random_gem_expanded usage
my $gem_expanded = random_gem_expanded('all');
my $unsorted_expanded = random_gem_expanded('unsorted');
my $beryl_expanded = random_gem_expanded('beryl'); # or use random_gem_variety or random_gem
my $chalcedony_expanded = random_gem_expanded('chalcedony'); # or use random_gem_variety or random_gem
my $corundum_expanded = random_gem_expanded('corundum');
my $quartz_expanded = random_gem_expanded('quartz'); # or use random_gem_variety or random_gem
my $organic_expanded = random_gem_expanded('organic'); # or use random_gem_variety or random_gem
my $metal_expanded = random_gem_expanded('metal');
# random_gem usage
my $gem = random_gem('all');
my $unsorted = random_gem('unsorted');
my $beryl = random_gem('beryl');
my $chalcedony = random_gem('chalcedony');
my $corundum = random_gem('corundum');
my $quartz = random_gem('quartz');
my $organic = random_gem('organic');
my $metal_2 = random_gem('metal');
my $no_metal = random_gem('no metal');
# random_metal usage
my $metal_3 = random_metal;
# random_jewelry usage
my $jewelry = random_jewelry(1); # or any number
Random::GemMetalJewelry returns a random gem, metal, or jewelry.
These options are applicable to random_gem_variety
, random_gem_color
, and random_gem_cut
.
random_gem_variety;
random_gem_variety();
random_gem_variety('all');
random_gem_variety(undef);
random_gem_color;
random_gem_color();
random_gem_color('all');
random_gem_color(undef);
random_gem_cut;
random_gem_cut();
random_gem_cut('all');
random_gem_cut(undef);
These options will select any value in any list related to the function. You can read the options below to see all of the potential values.
random_gem_variety('unsorted');
The unsorted
option returns diamond, garnet, spinel, topaz, tourmaline, zircon, or crystal.
random_gem_variety('beryl');
The beryl
option returns emerald or aquamarine.
random_gem_variety('chalcedony');
The chalcedony
option returns agate, bloodstone, carnelian, jasper, onyx, sard, or sardonyx.
random_gem_variety('corondum');
The corundum
option returns ruby or sapphire.
random_gem_variety('quartz');
The quartz
option returns milky quartz, rose quartz, smokey quartz, amethyst, or citrine.
random_gem_variety('organic');
The organic
option returns amber, coral, ivory, jet, pearl, or seashell.
random_gem_variety('metal');
The metal
option returns aluminum, brass, bronze, cobalt, copper, electrum, gold, iron, lead, nickel, pewter, platinum, silver, steel, tin, or titanium.
random_gem_color('diamond');
The diamond
option returns black, blue, brown, colorless, gray, green, pink, red, or yellow.
random_gem_color('garnet');
The garnet
option returns black, brown, colorless, green, orange, pink, purple, red, violet, or yellow.
random_gem_color('sapphire');
The sapphire
option returns blue, colorless, green, pink, or yellow.
random_gem_color('spinel');
The spinel
option returns blue, orange, pink, or red.
random_gem_color('topaz');
The topaz
option returns blue, green, pink, yellow, brown, or orange.
random_gem_color('gold');
The gold
option returns blue, black, green, gray, pink, purple, red, rose, white, or yellow.
random_gem_cut('brilliant');
The brilliant
option returns oval or round.
random_gem_cut('fancy');
The fancy
option returns marquise, pendeloque, or scissors.
random_gem_cut('mixed');
The mixed
option returns cushion or mixed.
random_gem_cut('step');
The step
option returns baguette, octagon, oval, square, or table.
random_gem_cut('other');
The other
option returns bead, carving, cabochon, or polished.
random_gem_expanded
is a combination of random_gem_variety
and random_gem_color
and has the same options as random_gem_variety
. If the gem variety returned has a corresponding color option, a random color will be returned for the gem variety. The combination will be returned. If "diamond" is returned as the variey, a "blue diamond" could be returned.
random_metal
is an alias for random_gem_variety('metal')
and has no options.
random_gem
has the same options as random_gem_variety
with the addition of no metal
.
random_jewelry();
random_jewelry
returns a random piece of jewelry. The jewelry returned can be anklet, belt buckle, bracelet, brooch, chatelaine, crown, cuff link, earrings, necklace, ring, tiara, tie bar, pocket watch, or wrist watch with gems.
random_jewelry('0');
If you do not want any gems on the piece of jewelry, use 0
.
random_jewelry('2'); # or any number
The number you enter will be the amount of gems attached to the jewelry.
by keys
is applicable to random_gem_variety
, random_gem_color
, and random_gem_cut
.
random_gem_variety('by keys');
random_gem_color('by keys');
random_gem_cut('by keys');
The by keys
option returns a random key listed above related to the function.
keys
is applicable to random_gem_variety
, random_gem_color
, and random_gem_cut
.
random_gem_variety('keys');
random_gem_color('keys');
random_gem_cut('keys');
The keys
option will list all of the available keys related to the function in an array reference.
data
is applicable to random_gem_variety
, random_gem_color
, and random_gem_cut
.
random_gem_variety('data');
random_gem_color('data');
random_gem_cut('data');
The data
option will return the data used for the function in a hash reference.
These options are applicable to random_gem_variety
, random_gem_color
, and random_gem_cut
.
random_gem_variety('help');
random_gem_color('help');
random_gem_cut('help');
random_gem_variety('options');
random_gem_color('options');
random_gem_cut('options');
The help
or options
options will return a list of all of your options for the function.
You can add items to the list by adding an array reference with the additional items as the second parameter. This is only applicable to random_gem_variety
, random_gem_color
, and random_gem_cut
.
my @variety_additions = ('gem 1', 'gem 2');
random_gem_variety('<your option>', \@variety_additions);
my @color_additions = ('color 1', 'color 2');
random_gem_color('<your option>', \@color_additions);
my @cut_additions = ('cut 1', 'cut 2');
random_gem_cut('<your option>', \@cut_additions);
Random::GemMetalJewelry depends on Fancy::Rand, Fancy::Join::Grammatical, Lingua::EN::Inflect, and Exporter.
Lady Aleena
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.