package T;
sub new {
        my $cls = shift;
        bless [ @_ ], $cls
}

sub set_data {
        my $self = shift;
        @$self = @_;
}

sub copy {
        my $self = shift;
        bless [ @$self ], ref $self;
}

sub manifest {
        my $self = shift;
        print "type T, content: @$self\n\n";
}

package S;
our @ISA = 'T';



sub manifest {
        my $self = shift;
        print "type S, content: @$self\n\n";
}

package main;

print "
my $t = T->new('abc');
$t->manifest;

print "
my $s = S->new('SPQR');
$s->manifest;

print "
my $x = $t->copy;
$x->manifest;

print "
$x = $s->copy;
$x->manifest;

print "
$x->set_data('totally different');
print "\$x is: ";
$x->manifest;