in reply to Re^2: My globals are visable; but undef'ed
in thread My globals are visable; but undef'ed

my $class = ref($self) || $self;

You could throw in another case, just to prevent someone from accidentally calling this method with a $self that happens to evaluate to false:

my $class = ref($self) || $self || __PACKAGE__;