in reply to usage of __PACKAGE__

$ perl -MO=Deparse -e '$hash{__PACKAGE__} = 1' $hash{'__PACKAGE__'} = 1;
__PACKAGE__ gets treated as a string, as does any bareword (keyword or not) that you use to index a hash (think $foo{shift}). The easiest fix is adding a plus sign to make it an expression instead of a string.
$ perl -MO=Deparse -e '$hash{+__PACKAGE__} = 1' $hash{'main'} = 1;

blokhead