Home: Perl Programming Help: mod_perl:
How to include global information in perl/mason



kenpeter
New User

Feb 14, 2010, 8:23 PM


Views: 13942
How to include global information in perl/mason

This is my apache.conf file in my local machine (Ubuntu)

<VirtualHost *:80>
......
DocumentRoot /var/www


.......
.......

ScriptAlias /myapp /var/www/test/myapp/public_html/index.html
<Directory "/var/www/test/myapp/public_html/">
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler

Action html-mason /var/www/test/myapp/public_html/cgi-bin/mason.speedy
SetHandler html-mason
</Directory>

</VirtualHost>


* /var/www/test/myapp/public_html/cgi-bin/mason.speedy has all the global information: session, database connection, etc. I need to make it globally, so the other html pages can use those global information. (I don't know the correct way to do it)

* The above configuration is not correct.


kenpeter
New User

Feb 16, 2010, 4:03 AM


Views: 13916
Re: [kenpeter] How to include global information in perl/mason

Could someone please helpe me?