NAME

Scalar::RefType - simple scalar type checker

SYNOPSIS

use Scalar::RefType;

tie my $h1 => 'Scalar::RefType', {};
tie my $h2 => 'Scalar::RefType', 'HASH';
tie my $h3 => 'Scalar::RefType';

$h1 = [];  # dies, violates the type
$h2 = [];  # dies, violates the type

$h3 = {};  # sets the type
$h3 = [];  # dies

DESCRIPTION

This little module allows you to tie the type of a scalar to a specified reference type. If the refererence type of an assignment violates the tied type, the assignment throws an exception.

AUTHOR

Heiko Schlittermann <hs@schlittermann.de>