comparison Lib/IMPL/Object/PublicSerializable.pm @ 278:4ddb27ff4a0b

core refactoring
author cin
date Mon, 04 Feb 2013 02:10:37 +0400
parents 4d0e1962161c
children 8088779e539d
comparison
equal deleted inserted replaced
277:6585464c4664 278:4ddb27ff4a0b
1 package IMPL::Object::PublicSerializable; 1 package IMPL::Object::PublicSerializable;
2 use strict; 2 use strict;
3 3
4 use IMPL::Class::Member; 4 use IMPL::Const qw(:access);
5 5
6 sub restore { 6 sub restore {
7 my ($class,$data,$refSurrogate) = @_; 7 my ($class,$data,$refSurrogate) = @_;
8 8
9 if ($refSurrogate) { 9 if ($refSurrogate) {
20 my %seen; 20 my %seen;
21 21
22 my $val; 22 my $val;
23 23
24 defined($val = $this->$_()) and $ctx->AddVar($_,$val) foreach 24 defined($val = $this->$_()) and $ctx->AddVar($_,$val) foreach
25 map $_->Name,$this->get_meta( 25 map $_->name,$this->GetMeta(
26 'IMPL::Class::PropertyInfo', 26 'IMPL::Class::PropertyInfo',
27 sub { 27 sub {
28 $_->Access == IMPL::Class::Member::MOD_PUBLIC and 28 $_->access == ACCESS_PUBLIC and
29 $_->canGet and 29 $_->getter and
30 not $_->ownerSet and 30 not $_->ownerSet and
31 not $seen{$_->Name} ++ 31 not $seen{$_->name} ++
32 }, 32 },
33 1 33 1
34 ); 34 );
35 } 35 }
36 36