in reply to Re: scope and declaration in local packages
in thread scope and declaration in local packages

The initialisation of the variables happens at runtime (execution of the block), while the setting up of the subroutines happens at compile-time.

That explains my confusion as to why Perl doesn't complain about the functions but can't find the variables. Thanks!

The reason I'm not calling new is that I would like to encapsulate a regex (and relevant condition) inside the object which should work without actually creating an instance. I just want to store that regex in the object for cleanliness, apart from any actual OO code.