#!/usr/bin/perl -w
######################################################################
# inhCon.pl
######################################################################
# Perl Power! - Michael Schilli 1998
######################################################################

######################################################################
# Base class
######################################################################
package Basepac;

sub new {                 # base class constructor
    my $type = shift;
    my $self = {};
    bless $self, $type;
}

sub basemethod {          # base class method
    print "method: basemethod\n";
}

######################################################################
# Derived class
######################################################################
package Deripac;

@ISA = qw ( Basepac );    # inherits from basepac
                         
sub derimethod {          # method of the derived class
    print "method: derimethod\n";
}

######################################################################
# Main program
######################################################################
package main;

$derobj = Deripac->new();  # initiate object of
                           # the derived class

$derobj->derimethod();     # own method
$derobj->basemethod();     # inherited method

