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

That's quite a lot of superfluous effort. Integers are 32-bit only, but strings can have as many bits as you want. Use vec.

use constant FOO => 0; use constant BAR => 1; use constant BAZ => 2; use constant QUUX => 452; sub permits { my $self = shift; vec( $self->{perms}, $_, 1 ) or return for @_; return 1; } # and later if( $user->permits( FOO, BAR, BAZ ) ) { # ... }

Makeshifts last the longest.