in reply to Re: Re: Package Variables in Inheritance
in thread Package Variables in Inheritance
package Obj; use strict; sub name { undef } sub new { my $proto = shift; my $class = ref $proto || $proto; my $self = bless {}, $class; return $self; } sub test { my $self = shift; print $self->name, " \n"; } package Test; use strict; our @ISA=("Obj"); sub name { 'Testing' } package main; my $t = new Test; $t->test;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Package Variables in Inheritance
by tilly (Archbishop) on Nov 02, 2003 at 17:12 UTC |