http://qs321.pair.com?node_id=836567


in reply to Re: Simple inheritance question
in thread Simple inheritance question

Yeah, that does it:
#!/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");
Thanks all!