In the course of creating a sort of "restricted" scalar type, I've d
The idea is to create a variable which is restricted, for example, a scalar which can only contain a fixed number of characters. Ideally, it would work something like this:

my $super_scalar = SuperScalar->new(length => 15);

Which would make $special_scalar type 'SuperScalar', though as you can see, the mechanics of this are not so simply implemented.

So far, I have to make $special_scalar a reference to the actual "special scalar" tie'd variable, which means when you use this thing it gets all messy: