The bless operator turns the variable pointed to by the reference into an "instance variable" for an object, thus creating an instance of a class, to use the parlance of Java or C++. __PACKAGE__ is a special variable that contains the current package name, so the singleton is an instance of the current package. The idea of a Singleton class is that there should be only one instance of it.
As merlyn has pointed out elsewhere, you don't really need to create an instance at all:
http://www.perlmonks.org/?node_id=183417In reply to Re: syntax question
by jakeease
in thread syntax question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |