DWH_File::Subscript::Wired - DWH_File::Subscript::Wired documentation


DWH_File documentation Contained in the DWH_File distribution.

Index


Code Index:

NAME

Top

DWH_File::Subscript::Wired -

SYNOPSIS

Top

DWH_File::Subscript::Wired is part of the DWH_File distribution. For user-oriented documentation, see DWH_File documentation (perldoc DWH_File).

DESCRIPTION

Top

COPYRIGHT

Top

AUTHORS

Top

    Jakob Schmidt <schmidt@orqwood.dk>


DWH_File documentation Contained in the DWH_File distribution.

package DWH_File::Subscript::Wired;

use warnings;
use strict;
use vars qw( @ISA $VERSION );
use overload
    '""' => \&to_string,
    fallback => 1;

use DWH_File::Subscript;
use DWH_File::Slot;

@ISA = qw( DWH_File::Subscript DWH_File::Slot );
$VERSION = 0.01;

sub new {
    my ( $this, $owner, $value ) = @_;
    my $class = ref $this || $this;
    my $self = { owner => $owner,
		 value => $value,
		 };
    bless $self, $class;
    return $self;
}

sub from_input {
    my ( $this, $owner, $actual ) = @_;
    defined $actual or $actual = '';
    return $this->new( $owner, DWH_File::Value::Factory->
		               from_input( $owner->{ kernel }, $actual ) );
}

sub to_string {
    return pack( "L", $_[ 0 ]->{ owner }{ id } ) . $_[ 0 ]->{ value };
}

sub actual {
    return $_[ 0 ]->{ value }->actual_value;
}

1;

__END__

CVS-log (non-pod)

    $Log: Wired.pm,v $
    Revision 1.1  2002/12/19 22:02:32  schmidt
    Handles hash keys which are live references