A colleague of mine is having trouble preloading Template.pm under Apache/mod_perl on Mac OS X. It works fine when called directly within a handler module, but if he tries to use it via "PerlModule Template", Apache freezes on restart. And if he puts "use Template ();" in a startup file, it generates the following error:
Syntax error on line 1 of /etc/httpd/perl.conf: Bareword "O_CREAT" not allowed while "strict subs" in use at /Library/Perl/darwin/Template/Document.pm line 251. Bareword "O_WRONLY" not allowed while "strict subs" in use at /Library/Perl/darwin/Template/Document.pm line 251. Bareword "O_TRUNC" not allowed while "strict subs" in use at /Library/Perl/darwin/Template/Document.pm line 251. Compilation failed in require at /Library/Perl/darwin/Template/Provider.pm line 43. BEGIN failed--compilation aborted at /Library/Perl/darwin/Template/Provider.pm line 43. Compilation failed in require at /Library/Perl/darwin/Template.pm line 34. BEGIN failed--compilation aborted at /Library/Perl/darwin/Template.pm line 34. Compilation failed in require at /etc/httpd/startup.pl line 9. BEGIN failed--compilation aborted at /etc/httpd/startup.pl line 9. Compilation failed in require at (eval 6) line 1. His system is: Mac OS X 10.1.3 Perl 5.6.0 Apache/1.3.22 (Darwin) PHP/4.1.2 mod_perl/1.26 DAV/1.0.3 Line 1 of /etc/httpd/perl.conf is: PerlRequire /etc/httpd/startup.pl And the offending line of startup.pl is: use Template (); Any ideas as to what would cause this? -Tim
