in reply to typeglob reference deletes global lexical

It looks like you're trying to get a subref for a method. Hence, the use of $proto->package_name. A much simpler solution is my $subref = $proto->can( $name );

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?