Help for this page
use Tie::Constrained; tie my $array_ref, 'Tie::Constrained', sub { ref $_[0] eq 'ARRAY' };
tie my $hash_ref, 'Tie::Constrained', sub { ref $_[0] eq 'HASH' }; ... 'Tie::Constrained', sub { ref $_[0] and $_[0]->isa('CGI') }, CGI->new;