GX::Meta::Attribute::Hash

Module Version: 0.2000_01

NAME

GX::Meta::Attribute::Hash - Attribute metaclass

SYNOPSIS

None.

DESCRIPTION

This module provides the GX::Meta::Attribute::Hash class which extends the GX::Meta::Attribute class.

METHODS

Constructor

new

Returns a new GX::Meta::Attribute::Hash attribute metaobject.

$attribute = GX::Meta::Attribute::Hash->new( %attributes );
Attributes:
  • default ( HASH reference )

    See GX::Meta::Attribute. The supplied value must be a reference to a hash.

  • initializer ( string | CODE reference )

    See GX::Meta::Attribute. The initializer must return a reference to a hash.

  • weaken ( bool )

    A boolean flag indicating whether or not to weaken the stored attribute values. Defaults to false.

  • See GX::Meta::Attribute for more.
Returns:
Exceptions:

Public Methods

See GX::Meta::Attribute.

USAGE

Accessor Types

This attribute class provides the following accessor types:

  • clear

    $invocant->accessor;
  • default

    %data = $invocant->accessor;
    %data = $invocant->accessor( %data );
    $data = $invocant->accessor( ... );
  • delete

    $value = $invocant->accessor( $key );
  • exists

    $bool = $invocant->accessor( $key );
  • get

    %data = $invocant->accessor;
    $data = $invocant->accessor;
  • get_keys

    @keys = $invocant->get_keys;
  • get_list

    %data = $invocant->accessor;
  • get_reference

    $data = $invocant->accessor;
  • get_value

    $value = $invocant->accessor( $key );
  • get_values

    @values = $invocant->get_values;
  • set

    $invocant->accessor( %data );
  • set_value

    $invocant->accessor( $key => $value );
  • set_values

    $invocant->accessor( $key => $value, ... );
  • size

    $size = $invocant->size;

SEE ALSO

AUTHOR

Jörg A. Uzarek <uzarek@runlevelnull.de>

COPYRIGHT AND LICENSE

Copyright © 2009-2011 Jörg A. Uzarek.

This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.