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

Hey guys,
I have got some good pieces of advice here which is also leading to some kind of confusion.
The problem resolved a little when I commented out the

require ... require

lines in Client.pm
I am going to first heck out the Exporter module.
But could someone tell me what is the best way to include a global(common file which has carries commonly used subroutines) file in all my packages in perl files.
It seems that by using require and use together, is causing this error.
Thanks

Replies are listed 'Best First'.
Re^5: Object oriented mess
by Joost (Canon) on Apr 13, 2005 at 15:24 UTC
    The standard way is to put those "global" routines in their own module (that is, in Some.pm file with package Some;).

    That way you can either refer to them directly, as Some::function() or you can use Exporter to export them to other namespaces that want them (and they will also have some control over which functions/variables they'll import, if you set up Exporter correctly).