in reply to Re: Object oriented mess
in thread Object oriented mess

If i simply not use
use Client;
the entire application works fine. So I feel that there is something wrong with Client.pm. But I have been reading tutorials and sample scripts and moreove Client.pm just has two functions in it. I spent several hours yesterday trying to figure out what i am missing here.

Replies are listed 'Best First'.
Re^3: Object oriented mess
by derby (Abbot) on Apr 13, 2005 at 14:54 UTC
    Correct ... check out require.

    Note that the file will not be included twice under the same specified name.

    Add into that mix that require happens at run-time, use at compile and the notion that require pulls in the current namespace and voila - your subs are in your client namespace. (replace &sub_x with &Client::sub_x to see).

    And that's why I try not to mix require with use. If I have global functions -- then either create a base class and let your Client class inherit them or create a util class and let your Client class use them.

    -derby
Re^3: Object oriented mess
by Joost (Canon) on Apr 13, 2005 at 14:38 UTC
      Internal server 500 error.

      I have just posted the code for Client.pm above...