my ($self) = @_; # You should probably write:
my ($self) = shift; # Option 1.
my ($self) = $_[0]; # Option 2. The two options do a very similar thing, choose the one that suits you and make sure you understand what they mean.
####
for (my $i = 1; $i <= $size; $i++) # This is OK, but it is C style, not Perl.
####
for my $i (1 .. $size) # This is more Perlish and more readable. It's a matter of taste.
####
$self->{allowed} = [undef, (1) x $size];