Installed apache2 and dev-perl/HTML-Mason via portage. Added some Mason directives listed at masonhq.com to httpd.conf PerlModule HTML::Mason::ApacheHandler <Location /> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </Location> Started Apache2, then tried loading my page. I got an internal server error with following message in apache error log: [Thu Nov 15 22:50:57 2007] [error] [client 192.168.1.3] Cannot create directory '/usr/lib/apache2/mason/obj' (mkdir /usr/lib/apache2/mason/obj: Permission denied at /usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/Interp.pm line 301\n) for user 'apache', group 'apache'. Perhaps you need to create or set permissions on your data_dir ('/usr/lib/apache2/mason'). \nStack:\n [/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/Interp.pm:318]\n [/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/Interp.pm:222]\n [/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/Interp.pm:169]\n [/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/Interp.pm:155]\n [/usr/lib/perl5/vendor_perl/5.8.8/Class/Container.pm:329]\n [/usr/lib/perl5/vendor_perl/5.8.8/Class/Container.pm:53]\n [/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/ApacheHandler.pm:633]\n [/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/ApacheHandler.pm:412]\n [(eval 33):6]\n [-e:0]\n The directory /usr/lib/apache2/mason did not exist. Reproducible: Didn't try I was able to make the problem go away by creating the directory /usr/lib/apache2/mason and chowning it to Apache2's user/group. The simplest fix would be to have the ebuild do the same thing but I don't know if having files belonging to apache user under /usr/lib is considered good practice.
Please reopen if this is still a problem with current versions.