in reply to Re: Re: Simple OO
in thread Simple OO

Without the use statement I get:
No such class wolf at demo.pl line 22, near "my wolf" syntax error at demo.pl line 22, near "my wolf="
The reason for this error message is a bit more obscure. (It has to do with something called "indirect object syntax".) However, the error goes away if turn the bareword wolf into the scalar $wolf.
my $wolf=new sheep; ^
I suspect this is what you had in mind.

Replies are listed 'Best First'.
Re: Re: Re: Re: Simple OO
by lzcd (Pilgrim) on Feb 12, 2002 at 07:17 UTC
    Obviously my brain is feeling unpunctuated today. Thank you all for the $help. Sorry to be a pain but any ideas on why I get a
    Can't locate object method "bleet" via package "HASH" at demo.pl line +23.
    ? (Is this my cargo finally coming home?)
      ...any ideas on why I get...

      See Kanji's earlier response.

      ? (Is this my cargo finally coming home?)

      Perl requires a certain eye to punctuation. For a free language, it is surprisingly insistent on seeing dollar signs in the right places.