use Attribute::Types; my $count : INTEGER; # Can only store an integer my $restr : INTEGER(10..20) # Can only store an integer # between 10 and 20. my $some : Type(&somesub); # Can only store values for # which somesub() returns true.