Class::SingletonProxy - proxy class methods to a singleton


Class-SingletonProxy documentation  | view source Contained in the Class-SingletonProxy distribution.

Index


NAME

Top

Class::SingletonProxy - proxy class methods to a singleton

SYNOPSIS

Top

  package Foo;
  use base Class::SingletonProxy;

  sub SINGLETON {
      return Foo::Impl->new();
  }

  package main;

  Foo->hello;
  Foo->bar(1234);




DESCRIPTION

Top

classes derived from Class::SingletonProxy redirect class methods to (per class) singleton objects.

METHODS

$class->SINGLETON()

this method can be redefined on subclasses and is automatically called to create the singleton when it has not been previously defined.

$class->singleton()
$class->singleton($singleton)

gets/sets the class singleton object.

COPYRIGHT AND LICENSE

Top


Class-SingletonProxy documentation  | view source Contained in the Class-SingletonProxy distribution.