#!perl -w
use strict;
# test of over load of an AUTOLOAD feature
package Seq;
use GetterSetter 0.001;
our $ISA = "GetterSetter";
sub new {
my ($self) = shift;
my $class = ref($self) || $self;
$self = { seq => shift || "", filename => "", };
return bless($self, $class);
}
sub seq {
my $self = shift;
die("Illegal access to `seq' field in class Seq") if @_;
return $self->{seq};
}
# test of the illegal overwrite of a sequence
{
my $seq = Seq->new("GACT");
print "Sequence: ", $seq->seq( ), "\n";
print "Set Sequence: ", $seq->seq("ATAG"), "\n";
exit(0);
}