OOP::Perlish::Class::Singleton
Create a singleton class. Only one instance of this class will ever exist, no matter how many times a call is made to OOP::Perlish::Class::Singleton->new(); The first call will create the instance, and all subsequent calls will receive references to that first instance.
Note that all arguments passed to the constructor after initial object instantiation will be ignored. This can produce circumstances where the behavior of the singleton not what was expected in certain portions of code. For this reason, Singletons should usually be stateless and/or read-only, and not have required accessors.
This module will $self->debug() diagnostics; run with instance, class, or global debugging enabled (as described in OOP::Perlish::Class) in development.
This means that more than one call to OOP::Perlish::Class::Singleton->new(%args) was made with arguments, and the arguments were ignored the second time.
To install OOP::Perlish::Class, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OOP::Perlish::Class
CPAN shell
perl -MCPAN -e shell install OOP::Perlish::Class
For more information on module installation, please visit the detailed CPAN module installation guide.