My guess is that you have these packages inline in your program, declared below your actual program code. If that is the case, the problem is likely to be that the line:
@objFood::ISA = qw(Object);
is not getting executed - don't forget that an assignment like that happens at runtime, not at compile time.
If you put your packages in a separate file and load them via "use" or "require", file-scope statements like that will get executed at the point the package is loaded. Alternatively, while the packages remain inline in the script you can either move the @ISA assignment earlier in the script, or wrap it in a BEGIN block:
BEGIN { @objFood::ISA = qw(Object); }
Hugo
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.