in reply to Objects in Objects

Executing the code
#!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));
I don't get your error. Do you really have the two lines
use foo; ... my $foo = Foo->new;
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).
Oh, and remember: use strict; use warnings;.
Cheers, CombatSquirrel.

Replies are listed 'Best First'.
Login before you post ;)
by jeffa (Bishop) on Aug 23, 2003 at 13:59 UTC
    Don't forget to login before you post CombatSquirrel. :)

    This is why i tell everyone here to change their theme. GOTO your User Settings and scroll on down to 'Theme Configuration'. Change your theme to anything but the default theme. Now, when you bring up Perlmonks in your browser, if you see the default theme - you know you are not logged in. Also, while you are at your User Settings, feel free to add some custom CSS - i have added background images to mine. Know i really know if i am logged in or not!

    Another problem is accessing http://www.perlmonks.org vs. http://perlmonks.org - it is possible to set your cookie for one and not the other. This too, can cause you to think that you are logged in, but you aren't. Again, if you use another theme (especially one like the Dark Theme with a black background) you will know you are not logged in (unless you are drunk!). ;)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      Yeah, sorry, jeffa. I'm fiddling around with the CSS at the moment; the only problem is that I like the standard theme too much - I hate those overloaded web pages, or me, beauty lies in simplicity. I'll try to make the CSS affect only an unimportant portion of the page that I'll nevertheless notice. I just tried font[size="2"] { color:blue }, but that made all the replies colored blue - quite ugly.
      Well, thanks for your reminder anyways.
      CombatSquirrel.
      P.S.: Changed it to form { color:blue } - still sub-optimal, but a lot better.
        I also like the default but it is hard to tell if I'm are logged in. After fighting with the other themes a bit I started playing with the CSS and changed the color for the links. That way when I log in my links are a bit brighter (and it's much easier for me to see where I have been too). My CSS is as follows:

        a:link { color: #0000FF } a:visited { color: #800080 } a:active { color: #0000FF } textarea { width: 100%; height: 460px; }

        The text area makes for a nice big text entry box too.

        HTH
        Daeve