NAME

FuseBead::From::PNG::Bead - A simple representation of a fuse bead

SYNOPSIS

use FuseBead::From::PNG::Bead;

my ($color) = ('BLACK');

my $object = FuseBead::From::PNG::Bead->new(
    color  => $color,
    meta   => {} # Anything else we want to track
);

# Get at the data with accessors

DESCRIPTION

Representation of a FuseBead Bead plus additional meta data about that bead

USAGE

new

Usage     : ->new()
Purpose   : Returns FuseBead::From::PNG::Bead object

Returns   : FuseBead::From::PNG::Bead object
Argument  :
               color -> must be a valid color from L<FuseBead::From::PNG::Const>
               meta  -> a hashref of additional meta data for the instanciated bead
Throws    : Dies if the color is invalid

Comment   : Clobbers meta if it's not a valid hashref
See Also  :

id

See identifier

identifier

Usage     : ->identifier()
Purpose   : Returns bead id, which is based on color

Returns   : the indentifier. Format: <color>
Argument  :
Throws    :

Comment   : Identifiers aren't necessarily unique, more than one bead could have the same identifier and different meta for instance
See Also  :

color

Usage     : ->color() or ->color($new_color)
Purpose   : Returns color for the bead, optionally a new color may be set

Returns   : color value for this bead
Argument  : Optional. Pass a scalar with a new valid color value to change the beads color
Throws    :

Comment   :
See Also  :

diameter

Usage     : ->diameter() or ->diameter($new_number)
Purpose   : Returns diameter for the bead, optionally a new diameter may be set

Returns   : diameter value for this bead
Argument  : Optional. Pass a scalar with a new valid diameter value to change the beads diameter
Throws    :

Comment   :
See Also  :

meta

Usage     : ->meta()
Purpose   : Returns bead meta data

Returns   : bead meta data
Argument  :
Throws    :

Comment   :
See Also  :

color_info

Usage     : ->color_info()
Purpose   : Returns hash of color info related to beads current color

Returns   : hash of color info
Argument  :
Throws    :

Comment   :
See Also  :

flatten

Usage     : ->flatten()
Purpose   : Returns an unblessed version of the data

Returns   : hashref of bead data
Argument  :
Throws    :

Comment   :
See Also  :

BUGS

SUPPORT

AUTHOR

Travis Chase
CPAN ID: GAUDEON
gaudeon@cpan.org
https://github.com/gaudeon/FuseBead-From-Png

COPYRIGHT

This program is free software licensed under the...

The MIT License

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

perl(1).