> Sam Tregar wrote: > > On Sun, 16 May 2004, Nishikant Kapoor wrote: > > > >>Apparently, 'featuredLinks.cgi' is returning the template from the cache > >>when I expect it to generate a new one. This is how I am calling the > >>template: > >> > >> my $tmpl = HTML::Template->new(filename => $linksTmpl, > >> file_cache => 1, > >> file_cache_dir => 'tmplCache', > >> file_cache_dir_mode => 0777); > > > > > > What do you mean by 'generate a new one'? Are you auto-generating > > your templates in some way? Usually templates are edited by hand and > > the file_cache only refreshes when the mtime on the file changes due > > to an edit. > > I meant that the template should get re-filled with default links when I > log out rather than returning customized links (which were displayed > when I was logged in). > > I do edit the template by hand but in this case, the mtime on the > template is not changing. However, the content for the template needs to > change based on whether the user is logged-in or logged-out.
This sounds like you are using H::T incorrectly... somewhere in you template you should probably doing somthing like: <TMPL_IF logged_in> <TMPL_INCLUDE logged_in.tmpl> <TMPL_ELSE> <TMPL_INCLUDE default.tmpl> </TMPL_IF> You may need to put more information in the email, as it appears that what you are trying to do, is reasonably simple thus you shouldn't really be getting stuck. > > >>Another issue, though not a big one. Even though I specify '0777' for > >>creating file_cache_dir, I still get 'tmplCache' created with '0755' > >>permissions. > > > > > > Huh, that's odd. I'm passing that mode as the second arg to mkdir(). > > That should work. Are you sure you didn't create the directory > > yourself? > > Yep, I made sure of that by removing 'tmplCache' and letting H::T create it. This could be related to your 'uname' mask - if it is set to '022' then you have found your answer. Mathew ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users