Oryx::DBM::Attribute - DBM implementation of attributes


Oryx documentation Contained in the Oryx distribution.

Index


Code Index:

NAME

Top

Oryx::DBM::Attribute - DBM implementation of attributes

SYNOPSIS

Top

See Oryx::Attribute.

DESCRIPTION

Top

While the Oryx::Value classes ensure that serialization is handled properly, this class actually stores attribute data into the DBM database.

SEE ALSO

Top

Oryx, Oryx::DBM, Oryx::Attribute, Oryx::Value

AUTHOR

Top

Richard Hundt <richard NO SPAM AT protea-systems.com>

COPYRIGHT AND LICENSE

Top


Oryx documentation Contained in the Oryx distribution.

package Oryx::DBM::Attribute;

use Oryx::Value;

use base qw(Oryx::Attribute);

sub create {
    my ($self, $proto) = @_;
    my $attr_name = $self->name;
    $proto->{$attr_name} = $self->deflate($proto->{$attr_name});
}

sub update {
    my ($self, $proto, $object) = @_;
    my $attr_name = $self->name;
    my $value = $object->$attr_name;
    $proto->{$attr_name} = $self->deflate($value);
}

1;
__END__