How about adding leftshift() and rightshift() as functions in a standard bitvec.pm, rather than fiddling with the meaning of >> and << ?