Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Today's annoyance was writing this bit of code for tearing down my test database:
no warnings 'redefine';
*DESTROY = sub {
my $self = shift;
my $dbh = $self->dbh;
# boring stuff
$dbh->disconnect;
};
That's in my _initialize method for the constructor. That eliminated my "subroutine DESTROY redefined at
Of course, the garbage collection bugs also mean that the stored database handle might be garbage collected when I get to this point. I'll have to fix that, too, if it hits me (usually done with an annoying lexical variable hanging around in my otherwise clean code). Has this ever been fixed?
Update: How embarrassing. I remembered how to solve this:
use Sub::Identify ':all';
main::diag(stash_name(\&DESTROY));
Guess what? That DESTROY came from my own Class::BuildMethods. Of course, I documented that it exports a DESTROY unless specifically told not to, so it's my own fault
Have DESTROY call something else... (Score:1)
Re:Have DESTROY call something else... (Score:2)
I provide a similar facility. My DESTROY method now looks like this:
I might make silly mistakes, but not that silly :)