in reply to Re^3: Mini-Tutorial: Working with Odd/Even Elements
in thread Mini-Tutorial: Working with Odd/Even Elements

By the way, your fixed is still broken. It only works if the calling package is one level away from the root. If the caller is Foo, it works. If the caller is Foo::Bar, it doesn't.

Using a symbolic ref is simpler than using %::.

my $pkg = do { no strict 'refs'; *{caller().'::'} };