in reply to Never letting package objects to go out of scope

Is this a good idea?

Sure it's a good idea. What you have done is something many people have found it expeditious to do on many occasions. It is a software pattern. In fact, it has a name: Singleton.

See the extensive discussion of it at the Portland Pattern Repository.
For a perl-centric view, see scrottie's Perl Patterns wiki.

  • Comment on Re: Never letting package objects to go out of scope