in reply to Can't call method "KEY_READ" on an undefined value

Per What shortcuts can I use for linking to other information?, to link to your scratchpad use [pad://OzVegan]: OzVegan's scratchpad. Otherwise user's will be logged out when trying to view it.

Btw, I could be wrong, but I think you want to change the following to lines

use cmpny::_Initializable; my $Registry;

to

package cmpny::_Initializable; our $Registry;

Replies are listed 'Best First'.
Re^2: Can't call method "KEY_READ" on an undefined value
by OzVegan (Acolyte) on May 11, 2011 at 00:26 UTC

    What's the difference between use and package? I thought package was to name the actual package not import one. I could be mistaken on its uses. It works with use no issues in other packages though.

      Okay, so during debugging I tested $Registry only to find it was undefined at the point I needed it. I tried wind's suggestion and set $Registry to our $Registry and hey presto it is no longer undefined.

      IT WORKS! So now I have to look into the our keyword a bit more. There's something I've missed. Thanks for the help.