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;
In reply to Re: Re: Re: Package Variables in Inheritance
by ysth
in thread Package Variables in Inheritance
by reyjrar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |