You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been having troubles with Perl calling the DESTROY method on my
objects twice (*in the same process*) during global destruction when the
Perl code forks. This happens often when using a module like
Net::Server::PreFork.
The problem has been reproduced on:
Perl 5.10/Debian on Debian squeeze
Perl 5.14.2/Ubuntu on Ubuntu 12.04
Perl 5.18/Debian on Debian jessie
Perl 5.20-RC1 from upstream Perl
A colleague of mine was so kind to boil the steps to reproduce further
down to this snippet not using any modules:
#!/usr/bin/perl
package MyModule;
use Devel::Peek;
sub new {
print "IN NEW\n";
return bless {};
}
sub DESTROY {
print "======= BEGIN DESTROY:".$$."========\n";
print Dump(@_);
print "============ END DESTROY:".$$."========\n";
}
1;
package main;
open my $fh, ">", "/tmp/some.pid";
print $fh $$;
close $fh;
Migrated from rt.perl.org#121946 (status was 'new')
Searchable as RT121946$
The text was updated successfully, but these errors were encountered: