Mercurial > pub > Impl
diff Lib/IMPL/Config/Activator.pm @ 93:0667064553ef
fixed _is_class in activator
rewritten IMPL::Config::Resolve
new features in the Abstract class
author | wizard |
---|---|
date | Wed, 28 Apr 2010 17:50:55 +0400 |
parents | 3d1f584aea60 |
children | 76515373dac0 |
line wrap: on
line diff
--- a/Lib/IMPL/Config/Activator.pm Tue Apr 27 20:10:07 2010 +0400 +++ b/Lib/IMPL/Config/Activator.pm Wed Apr 28 17:50:55 2010 +0400 @@ -21,7 +21,7 @@ sub _is_class { no strict 'refs'; - scalar keys %{"$_[0]::"} ? 1 : 0; + UNIVERSAL::can($_[0],'new') ? 1 : 0; } sub activate { @@ -44,7 +44,7 @@ push @args, map UNIVERSAL::isa($_,'IMPL::Config::Activator') ? $_->activate : $_, @_ if @_; my $factory = $this->factory; - eval "require $factory; 1;" unless ref $factory or _is_class($factory); + eval "require $factory; 1;" unless (ref $factory or _is_class($factory)); return $this->object($factory->new(@args)); } else {