Changeset 12582 for lang/perl/tiarra
- Timestamp:
- 05/28/08 04:30:37 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/tiarra/branches/module-reload/main/ModuleManager.pm
r12491 r12582 168 168 169 169 my ($foo); 170 push @{$this->{mod_disposables}->{$modname}}, 171 map { $foo = \$_; weaken($_); $foo } @disposables; 170 my (%addrs); 171 @{$this->{mod_disposables}->{$modname}} = grep { 172 defined $_ && !($addrs{refaddr($_)}++) 173 } (@{$this->{mod_disposables}->{$modname}}, 174 map { weaken($_); $_ } @disposables); 172 175 173 176 $this; … … 182 185 183 186 my $arr = $this->{mod_disposables}->{$modname}; 184 @$arr = grep { defined $ $_ } @$arr;187 @$arr = grep { defined $_ } @$arr; 185 188 186 189 my %targets = map { refaddr($_) => 1 } @disposables; 187 @$arr = grep { !$targets{refaddr($ $_)} } @$arr;190 @$arr = grep { !$targets{refaddr($_)} } @$arr; 188 191 189 192 if (!@$arr) { … … 203 206 return unless $arr; 204 207 205 foreach my $object (grep { defined $ $_ } @$arr) {208 foreach my $object (grep { defined $_ } @$arr) { 206 209 eval { 207 $ $object->module_destruct($module);210 $object->module_destruct($module); 208 211 }; if ($@) { 209 212 $this->_runloop->notify_error($@);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)