in reply to Re: Judiciously avoiding DESTROY method for CGI::Session clobber prevention
in thread Judiciously avoiding DESTROY method for CGI::Session clobber prevention

That's certainly doable. But I'd like to be able to take $instance and vanquish $instance without having to change the class code; for example, I'd like to avoid the possibility of nonorthogonality to other possible uses of the CGI::Session code in my mod_perl instance.

I have the inkling there may be something like this in the guts of Perl's OO code.

  • Comment on Re^2: Judiciously avoiding DESTROY method for CGI::Session clobber prevention

Replies are listed 'Best First'.
Re^3: Judiciously avoiding DESTROY method for CGI::Session clobber prevention
by ysth (Canon) on Aug 02, 2006 at 20:06 UTC
    There is, if you are sure it's what you want.
    my $instance; ... if (want to disable destroy) { package My::Private::DESTROYless::CGI::Session; sub DESTROY { } @ISA = 'CGI::Session'; bless $instance; }