Home  |  Linux  | Mysql  | PHP  | XML
From:Dermot Paikkos Date:Thu Apr 23 09:33:26 2009
Subject:RE: Global scope
> Dermot,
> 
> Thanks for responding!
> 
> Your points are correct; unfortunately, those errors were created by 
my
> simplification attempts.
> But the problem is when I wish to refer to those variables in other 
.pm
> modules that may be included with with use statements in the main .cgi
> program and those same variables may need to be also referenced in
> other
> included .pm inside referenced in those previously mentioned .pm
> modules.
> 


That shouldn't be a problem. Just `use options` in those modules as 
well.


There is a convention with modules, and someone might be better able to 
explain it than me, where the name-space is broken up a bit. So rather 
than

use options.pm; (it's your current directory).

use YourApp::Options; (It's in a folder called YourApp which is listed 
in your lib path).


You dont' have to do this of course. This is Perl, there is more than 
one way to do it, however these sorts of convention usually come about 
for a good reason.

Good luck,
Dp.


Navigate in group perl.beginners.cgi at sever nntp.perl.org
Previous Next


Your recent visits
Trying to decide between MDB2 and PHP PDO
Re: Web photo album, is this possible in CGI
Re: [PHP-WEBMASTER] PHP Update & PHP Upgrade
Re: [PHP-WIN] is ZendStudio IDE necessary????
Re: Bruce Armstrong's SMTP CCW example


  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants