Mercurial > pub > Impl
changeset 115:5edc2ac5231c
minor fix to the serialization mechanism
author | wizard |
---|---|
date | Wed, 26 May 2010 02:32:22 +0400 |
parents | 7084af955c57 |
children | 1722ca51537c |
files | .settings/org.eclipse.core.resources.prefs Lib/IMPL/Serialization.pm |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/.settings/org.eclipse.core.resources.prefs Tue May 25 01:26:42 2010 +0400 +++ b/.settings/org.eclipse.core.resources.prefs Wed May 26 02:32:22 2010 +0400 @@ -1,3 +1,3 @@ -#Sat Mar 13 04:39:05 MSK 2010 +#Tue May 25 20:59:30 MSD 2010 eclipse.preferences.version=1 encoding/<project>=cp1251
--- a/Lib/IMPL/Serialization.pm Tue May 25 01:26:42 2010 +0400 +++ b/Lib/IMPL/Serialization.pm Wed May 26 02:32:22 2010 +0400 @@ -178,13 +178,15 @@ # ������� �������������������� �������. # SurogateHelper($Type) # $Type ��� �����, ��� ������� ����� �������. - private _direct property SurogateHelper => prop_all; + private _direct property SurrogateHelper => prop_all; } sub CTOR { my ($this,%args) = @_; $this->{$CurrentObject} = undef; $this->{$Root} = undef; + $this->{$ObjectFactory} = $args{ObjectFactory} if $args{ObjectFactory}; + $this->{$SurrogateHelper} = $args{SurrogateHelper} if $args{SurrogateHelper}; } sub OnObjectBegin { @@ -223,7 +225,7 @@ if (defined $rhProps->{'id'}) { die new IMPL::Exception("Trying to create a simple object instead of a reference, type is missing.",$name,$rhProps->{id}) unless $rhProps->{'type'} ; - $this->{$Context}->{$rhProps->{'id'}} = $this->{$SurogateHelper} ? $this->{$SurogateHelper}->($rhProps->{'type'}) : DefaultSurogateHelper($rhProps->{'type'}); + $this->{$Context}->{$rhProps->{'id'}} = $this->{$SurrogateHelper} ? $this->{$SurrogateHelper}->($rhProps->{'type'}) : DefaultSurrogateHelper($rhProps->{'type'}); } } @@ -300,7 +302,7 @@ scalar keys %{"$_[0]::"} ? 1 : 0; } -sub DefaultSurogateHelper { +sub DefaultSurrogateHelper { my ($Type) = @_; if ($Type eq 'SCALAR' or $Type eq 'REF') {