Hi!
We're currently developing a fairly large extranet and using a lot of
HTML::Template's. Due to this we switched to using the shared_cache, and
I've gotten curious as to which templates is loaded when.
I'm sure someone must have a recipe on how to print a neatly formatted
list of which templates are loaded into shared memory (and preferably a
timestamp telling when the template was loaded.
Could that someone please post an example to the list?
I did try the following, which do tells me which template are loaded,
but there must be a smarter way to go about it:
<sample>
#!/usr/local/bin/perl -w
use strict;
use IPC::SharedCache;
my %self;
tie %self, 'IPC::SharedCache',
ipc_key => 'TMPL',
ipc_segment_size => 65536,
load_callback => sub {},
validate_callback => sub {};
print "Content-type: text/plain\n\n";
print "(Shared memory) Cached templates :\n";
for (keys %self) {
print "* $_\n";
my $template = $self{"$_"};
}
</sample>
(( Flemming ))
--
Flemming Mahler Larsen, Online Technology @ TDC Internet
http://card.netfactory.dk/ , +45 3552 6452
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users