sub new { my $this = shift; my $class = ref($this) || $this; # This part prevents a user from creating an # instance of the package, but still permits # subclasses to call the parent's new(). my (undef, $filename, $line) = caller; $filename =~ s/^.*\///; die "Abstract class $class must " . "be subclassed at $filename " . "line $line.\n" if $class =~ /^Processor$/; bless $self, $class; return $self; #### sub new { my $this = shift; my $class = ref($this) || $this; my $self = $this->SUPER::new(@_); bless $self, $class; return $self; }