in reply to A Bad Day to OOP :(

Hi.

You need to turn on warnings as well as strict.

Then you would see that return 1; probably isn't what you want to do. You want 1; all by itself.

Also, maybe you should use Fruit::Apple; and not just use Fruit;

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.

Replies are listed 'Best First'.
Re: Re: A Bad Day to OOP :(
by chromatic (Archbishop) on Apr 11, 2002 at 04:09 UTC
    You want 1; all by itself.

    return 1; is clunky, but it works. return 0; doesn't. return 'false'; does.

    Also, maybe you should use Fruit::Apple; and not just use Fruit;

    There's nothing to import from Fruit::Apple, and the filename is Fruit.pm. The two commingled steps of require and import() make things a little confusing at times, but pure OO modules are free to do some really funky things.