Class::SingletonProxy - proxy class methods to a singleton
package Foo; use base Class::SingletonProxy; sub SINGLETON { return Foo::Impl->new(); } package main; Foo->hello; Foo->bar(1234);
classes derived from Class::SingletonProxy redirect class methods to (per class) singleton objects.
this method can be redefined on subclasses and is automatically called to create the singleton when it has not been previously defined.
gets/sets the class singleton object.
Copyright (C) 2005 by Salvador Fandiño <sfandino@yahoo.com>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.