in reply to Interfaces
and then override the methods in the subclasses:package AbstractClass; sub new { my($class) = shift; bless { "classVar1" => undef, "classVar2" => undef }, $class; } sub methodOne { print "Error: Use of undefined Abstract Method\n"; } sub methodTwo { print "Error: Use of undefined Abstract Method\n"; }
package SomeObject; @ISA = ("AbstractClass"); sub methodOne { print "Doing the real function\n"; }
that's very basic code...would it do something like what you want?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Interfaces
by btrott (Parson) on Jun 07, 2000 at 03:16 UTC | |
by merlyn (Sage) on Jun 07, 2000 at 04:17 UTC | |
by ivey (Beadle) on Jun 13, 2000 at 22:44 UTC | |
|
RE: Re: Interfaces
by chromatic (Archbishop) on Jun 07, 2000 at 03:01 UTC |