in reply to Are array based objects fixed length?

Something like this untested code might work:

my $glob = eval "*" . ref($obj) . "\::DESTROY"; my $save = *$glob{CODE}; my $newsub = sub { warn("NEW DESTROY CALLED\n"); goto &$save }; no strict; *{ref($obj) . "\::DESTROY"} = $newsub; use strict;

Which stashes away the object package's DESTROY method, replaces it with a new one which in turn calls the old one. Hopefully I'm making sense. Let me know if I'm mumbling incoherently.

cephas