Mercurial > pub > Impl
comparison Lib/IMPL/Object/Abstract.pm @ 174:d920d2b70230
minor changes
| author | sergey |
|---|---|
| date | Tue, 04 Oct 2011 17:55:38 +0400 |
| parents | 4267a2ac3d46 |
| children | d1676be8afcc |
comparison
equal
deleted
inserted
replaced
| 173:aaab45153411 | 174:d920d2b70230 |
|---|---|
| 21 foreach my $super ( @{"${class}::ISA"} ) { | 21 foreach my $super ( @{"${class}::ISA"} ) { |
| 22 my $superSequence = $cacheCTOR{$super} || cache_ctor($super); | 22 my $superSequence = $cacheCTOR{$super} || cache_ctor($super); |
| 23 | 23 |
| 24 my $mapper = $refCTORS ? $refCTORS->{$super} : undef; | 24 my $mapper = $refCTORS ? $refCTORS->{$super} : undef; |
| 25 if (ref $mapper eq 'CODE') { | 25 if (ref $mapper eq 'CODE') { |
| 26 if ($mapper == *_pass_throgh_mapper{CODE}) { | 26 if ($mapper == *_pass_through_mapper{CODE}) { |
| 27 push @sequence,@$superSequence; | 27 push @sequence,@$superSequence; |
| 28 } else { | 28 } else { |
| 29 push @sequence, sub { | 29 push @sequence, sub { |
| 30 my $this = shift; | 30 my $this = shift; |
| 31 $this->$_($mapper->(@_)) foreach @$superSequence; | 31 $this->$_($mapper->(@_)) foreach @$superSequence; |
| 84 | 84 |
| 85 sub END { | 85 sub END { |
| 86 $Cleanup = 1; | 86 $Cleanup = 1; |
| 87 } | 87 } |
| 88 | 88 |
| 89 sub _pass_throgh_mapper { | 89 sub _pass_through_mapper { |
| 90 @_; | 90 @_; |
| 91 } | 91 } |
| 92 | 92 |
| 93 sub PassArgs { | 93 sub PassArgs { |
| 94 \&_pass_throgh_mapper; | 94 \&_pass_through_mapper; |
| 95 } | 95 } |
| 96 | 96 |
| 97 sub PassThroughArgs { | 97 sub PassThroughArgs { |
| 98 my $class = shift; | 98 my $class = shift; |
| 99 $class = ref $class || $class; | 99 $class = ref $class || $class; |
| 100 no strict 'refs'; | 100 no strict 'refs'; |
| 101 no warnings 'once'; | 101 no warnings 'once'; |
| 102 ${"${class}::CTOR"}{$_} = \&_pass_throgh_mapper foreach @{"${class}::ISA"}; | 102 ${"${class}::CTOR"}{$_} = \&_pass_through_mapper foreach @{"${class}::ISA"}; |
| 103 } | 103 } |
| 104 | 104 |
| 105 package self; | 105 package self; |
| 106 | 106 |
| 107 our $AUTOLOAD; | 107 our $AUTOLOAD; |
