Skip to content

Commit

Permalink
Revert "Re #10: Work around bug in Class::Observable observing instan…
Browse files Browse the repository at this point in the history
…ces (#60)"

This reverts commit b702188.
  • Loading branch information
ehuelsmann committed Jan 29, 2021
1 parent 944b73c commit b1d9e41
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lib/Workflow.pm
Expand Up @@ -373,19 +373,6 @@ sub _auto_execute_state {
}
}

# This DESTROY method is a work-around for the problem with Class::Observable
# that when an instance gets allocated in *exactly* the same address as an
# earlier instance (which has since been destroyed), the observer registration
# was actually *not* destroyed and the observers are applied to the new
# instance. See gh issue #10.
sub DESTROY {
my ($self) = @_;

# ignore all errors: during interpreter shutdown, none of the wrapped
# code is expected to work...
eval { $self->delete_all_observers() };
}

1;

__END__
Expand Down

0 comments on commit b1d9e41

Please sign in to comment.