![]() |
Practical mod_perl / HTML Version / | ![]() |
||
![]() |
||||
![]() |
![]() |
|||
![]() |
![]() |
|||
![]() |
||||
|
|
||||
![]() |
![]() |
|||
![]() |
6.3.3.2. A second faulty scenario |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
||
![]() |
||||
Now consider the following scenario:
project/MyConfig.pm project/runA.pl project/runB.pl
Now there is a single project with two scripts, runA.pl and runB.pl, both trying to load the same module, MyConfig.pm, as shown in Examples Example 6-12.
sub project_name { return 'Super Project'; }
1;
use lib qw(.); use MyConfig; print "Content-type: text/plain\n\n"; print "Script A\n"; print "Inside project: ", project_name( );
use lib qw(.); use MyConfig; print "Content-type: text/plain\n\n"; print "Script B\n"; print "Inside project: ", project_name( );
This scenario suffers from the same problem as the previous two-project scenario: only the first script to run will work correctly, and the second will fail. The problem occurs because there is no package declaration here.
We'll now explore some of the ways we can solve these problems.
 
Continue to:
mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice
![]() |
Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.