The other thing that grabbed my attention right away:
11 my %O = (); 12 my %P = ();
These are global variables
%O records the observers of each observed thing in the module
%P is a cache of @ISA information