Adeola Awoyemi wrote: [SNIP] > [Wed Jun 17 14:32:53 2009] [error] access to > /Users/adeola/projects/craftsmen/trunk/html/foo.html failed for > 127.0.0.1, reason: file error - : not found > > Not sure what I'm doing wrong. I have attached the module. Any > help/hints would be appreciated?
Do a debug of $file before the $TT->process to make sure it is set correctly. Also note that with your include path of: /Users/adeola/projects/craftsmen/trunk/lib:/Users/adeola/projects/craftsmen/trunk/html Your URL would need to be: http://example.com/foo.html Not: http://example.com/Users/adeola/projects/craftsmen/trunk/html/foo.html If $file is set to /Users/adeola/projects/craftsmen/trunk/html/foo.html before the process, you probably want to do: ------------------------------------------------------- my $file = $r->path_info; # Now remove ROOTDIR from beginning. return a failure if it isn't there. return fail(...) if $file !~ s[^$ROOTDIR][]; ------------------------------------------------------- instead of: ------------------------------------------------------- ( my $file = $r->path_info ) =~ s[^/][]; ------------------------------------------------------- Hope that helps. -- Josh _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
