in reply to Perl OO: switch package context.

You seem to think that there's a hierarchy implied in the :: notation as far as Perl is concerned. In essence, there isn't. Your classname is in fact "My::Package::Class". There's no separate "Class" anywhere in Perl's understanding. It's as if "::" is just another alphanumeric character in a name.

p.s. yes, I know about the nested hash-of-hashes to traverse the global package names, but that's an implementation detail that is nearly invisible to standard Perl hackers.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.