Re: using namespace

2005-01-27 Thread Marcello
Ramprasad A Padmanabhan ha scritto: Hi Manav, But still import does not work across multiple files. for eg, main.pl- #!/usr/bin/perl # use Some::Module qw(someFunction1); require MyLibModule; # This function will now work someFunction1(); MyLibModule::someOth

Re: using namespace

2005-01-27 Thread Randy W. Sims
Ramprasad A Padmanabhan wrote: Is there anyway I can do a using namespace for a particular loop like in c++; ( for functions not exported ) Below are a few dirty little tricks that can get you something similar, but I've never used them, and I'm not sure they are good practice... U

RE: using namespace

2005-01-27 Thread Ramprasad A Padmanabhan
rter > > Manav I do not want to use Some::Module in my '.pm' file. Simple reason is that the MyLibModule is being used by many scripts and every script does not need functions from Some::Module. Why should I load the module unneccarily then In C++ I can do { using namespace std;

RE: using namespace

2005-01-27 Thread Ramprasad A Padmanabhan
Hi Manav, But still import does not work across multiple files. for eg, main.pl- #!/usr/bin/perl # use Some::Module qw(someFunction1); require MyLibModule; # This function will now work someFunction1(); MyLibModule::someOtherFunction(); ---END--

RE: using namespace

2005-01-27 Thread Manav Mathur
see perldoc -f import perldoc -f use and what happens when you use Some::Module (qw/somefunction1 somefunction2/) ; Manav |-Original Message- |From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED] |Sent: Thursday, January 27, 2005 2:33 PM |To: perl beginners |Subject: using namespace

using namespace

2005-01-27 Thread Ramprasad A Padmanabhan
Is there anyway I can do a using namespace for a particular loop like in c++; ( for functions not exported ) FOr eg in a perl script use Some::Module { using namespace Some::Module; # Is this possible ? someFuntion1(); # Instead of Some::Module::someFunction1