Subject: | Can't locate object method "DESTROY" via package ... |
I was frequently getting segfaults with EV, so tried using ogd, but that always resulted in the error: Can't locate object method "DESTROY" via package "AnyEvent::CondVar" at /dev/perls/perl-5.18/lib/site_perl/5.18.1/ogd.pm line 135. The below change fixes it.
--- /tmp/ogd.pm 2014-01-19 19:58:59.000000000 +0000
+++ /tmp/new.pm 2014-01-19 19:59:08.000000000 +0000
@@ -132,7 +132,7 @@
foreach (reverse 0..$#object) {
next unless defined $object[$_];
$package{blessed $object[$_]}++;
- $object[$_]->DESTROY( 1 );
+ $object[$_]->DESTROY( 1 ) if $object[$_]->can('DESTROY');
$done++ if DEBUG;
}
print STDERR "!$done\n" if DEBUG;