|
Class::SingletonProxy - proxy class methods to a singleton |
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.
SINGLETON()singleton()singleton($singleton)
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.
|
Class::SingletonProxy - proxy class methods to a singleton |