comparison Lib/IMPL/Object/Singleton.pm @ 144:b56ebc31bf18

Empty nodes no more created while transforming a post request to the DOM document minor speed improvements to the object CTOR caching Added support for a secure processing (and 'laundering' ) a CGI parameters Many minor fixes
author wizard
date Tue, 13 Jul 2010 02:05:38 +0400
parents d9dd3500ead3
children 4267a2ac3d46
comparison
equal deleted inserted replaced
143:d9dd3500ead3 144:b56ebc31bf18
8 die new IMPL::InvalidOperationException("Only one instance of the singleton can be created",ref $_[0], $instances{ref $_[0]}) if $instances{ref $_[0]}; 8 die new IMPL::InvalidOperationException("Only one instance of the singleton can be created",ref $_[0], $instances{ref $_[0]}) if $instances{ref $_[0]};
9 $instances{ref $_[0]} = $_[0]; 9 $instances{ref $_[0]} = $_[0];
10 } 10 }
11 11
12 sub instance { 12 sub instance {
13 my $self = shift; 13 $instances{$_[0]}
14
15 $instances{$_[0]};
16 } 14 }
17 15
18 1; 16 1;
19 17
20 __END__ 18 __END__