Mercurial > pub > Impl
comparison Lib/IMPL/Object/Factory.pm @ 91:9cb8e730fa86
fixed factory
author | wizard |
---|---|
date | Mon, 26 Apr 2010 17:46:16 +0400 |
parents | 2f31ecabe9ea |
children | 7084af955c57 |
comparison
equal
deleted
inserted
replaced
90:dc1da0389db7 | 91:9cb8e730fa86 |
---|---|
31 my ($class,$data,$surrogate) = @_; | 31 my ($class,$data,$surrogate) = @_; |
32 | 32 |
33 my %args = @$data; | 33 my %args = @$data; |
34 | 34 |
35 if ($surrogate) { | 35 if ($surrogate) { |
36 $surrogate->callCTOR($args{factory},$args{parameters}); | 36 $surrogate->callCTOR($args{factory},$args{parameters},$args{method}); |
37 return $surrogate; | 37 return $surrogate; |
38 } else { | 38 } else { |
39 return $class->new($args{factory},$args{parameters}); | 39 return $class->new($args{factory},$args{parameters},$args{method}); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 sub CreateObject { | 43 sub CreateObject { |
44 my $this = shift; | 44 my $this = shift; |