Question:

What gets printed after execution of the following program?

package A;

sub new { return bless {}, shift; }
sub DESTROY { print ref(shift); }


package B;
use base 'A';

sub DESTROY {
    my $self = shift;
    print ref($self);
    bless $self, 'A';
}


package main;

my $obj = B->new();

Answers:


Keywords:

© 2017 QuizBucket.org