in reply to accessing package variables

I don't suppose you've tried this:

%packagename::hash

That should help.