Tie::Filter::Scalar - Tie a facade around a scalar


Tie-Filter documentation Contained in the Tie-Filter distribution.

Index


Code Index:

NAME

Top

Tie::Filter::Scalar - Tie a facade around a scalar

DESCRIPTION

Top

Don't use this package directly. Instead, see Tie::Filter.

SEE ALSO

Top

perltie, Tie::Filter

AUTHOR

Top

  Andrew Sterling Hanenkamp, <sterling@hanenkamp.com>

LICENSE AND COPYRIGHT

Top


Tie-Filter documentation Contained in the Tie-Filter distribution.
package Tie::Filter::Scalar;

use 5.008;
use strict;
use warnings;

use Tie::Filter;

our $VERSION = '1.02';

sub TIESCALAR {
	my ($class, $scalar, %args) = @_;
	$args{WRAP} = $scalar;
	return bless \%args, $class;
}

sub FETCH {
	my $self = shift;
	Tie::Filter::_filter($$self{FETCH}, ${$$self{WRAP}});
}

sub STORE {
	my $self = shift;
	my $value = shift;
	${$$self{WRAP}} = Tie::Filter::_filter($$self{STORE}, $value);
}

sub UNTIE { }

sub DESTROY { }

1