in reply to Freed From the Tyranny of Math::BigInt

As merlyn points out, perl has string versions of the bitwise operators. permits becomes slightly different, since you need to test for non-null bytes:
sub permits { my ($self, $mask) = @_; return (($self->{perms} & $mask) =~ y/\0//c); }
To retain the feature of having permits return not just a true or false value, but a usable bitmask of those permissions that were satisfied (untested):
sub permits { my ($self, $mask) = @_; $mask &= $self->{perms}; return ($mask =~ y/\0//c ? $mask : ""); }