目录

NAME

Class::Singleton - Implementation of a "Singleton" class

SYNOPSIS

use Class::Singleton;

my $one = Class::Singleton->instance();   # returns a new instance
my $two = Class::Singleton->instance();   # returns same instance

DESCRIPTION

This is the Class::Singleton module. A Singleton describes an object class
that can have only one instance in any system. An example of a Singleton
might be a print spooler or system registry. This module implements a
Singleton class from which other classes can be derived. By itself, the
Class::Singleton module does very little other than manage the instantiation
of a single object. In deriving a class from Class::Singleton, your module
will inherit the Singleton instantiation method and can implement whatever
specific functionality is required.

INSTALLATION

See the INSTALL file.

COPYRIGHT

Copyright (C) 1998 Canon Research Centre Europe Ltd.
Copyright (C) 1998-2008 Andy Wardley. All rights reserved.
Copyright (C) 2014, 2020 Steve Hay. All rights reserved.

LICENCE

This distribution is free software; you can redistribute it and/or modify it
under the same terms as Perl itself, i.e. under the terms of either the GNU
General Public License or the Artistic License, as specified in the LICENCE
file.
关于

Perl 的 Class::Singleton 模块,用于实现单例设计模式,确保一个类只有一个实例。

103.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号