in reply to Objects in Objects
I don't get your error. Do you really have the two lines#!perl use strict; use warnings; package Foo; sub new { my $class = shift; bless [], $class; } sub doFoo { my $obj = shift; print "foo::doFoo => @_\n"; } package Bar; sub new { my $class = shift; bless [], $class; } sub doBar { my $obj = shift; my $nfoo = new Foo; $nfoo->doFoo(@_); print "Bar::doBar => @_\n"; } package main; my $b = new Bar; $b->doBar(qw(i feel lucky));
If so, just fix the case. If not, please post a small piece of code that reproduces the error you are getting (in this case probably two small modules and one small program).use foo; ... my $foo = Foo->new;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Login before you post ;)
by jeffa (Bishop) on Aug 23, 2003 at 13:59 UTC | |
by CombatSquirrel (Hermit) on Aug 23, 2003 at 16:12 UTC | |
by daeve (Deacon) on Aug 23, 2003 at 17:25 UTC | |
by CombatSquirrel (Hermit) on Aug 23, 2003 at 17:33 UTC |