Thanks all!#!/usr/bin/perl -w use strict; { package One; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(test); sub test { my $x = pop; print "$x\n"; } } { package Two; use base "One"; sub new { One->import; my $self = {}; bless($self); } sub eg { test(pop); } } my $obj = new Two(); $obj->eg("hello");
In reply to Re^2: Simple inheritance question
by halfcountplus
in thread Simple inheritance question
by halfcountplus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |