Skip Menu |

This queue is for tickets about the Dir-List CPAN distribution.

Report information
The Basics
Id: 20981
Status: resolved
Priority: 0/
Queue: Dir-List

People
Owner: Nobody in particular
Requestors: andreas.huber [...] mnet-online.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.3
Fixed in: 1.4



Subject: Dir::List - cached results with mod_perl environment
Hi Oliver, when I use Dir::List in a mod_perl environment, I get cached results for the second and furthermore calls to dirinfo. This problem exists if you instantiate Dir::List only one time, and call it serveral times. (call to sub handler in listing) I think this is because "$self->{list}" isn't deleted at the start of sub dirinfo. Thanks Andi #--------------------------------------------------- package Test; use Dir::List; my $dir = new Dir::List({ check_diskusage => 0, show_directory_owner => 1, show_directory_group => 0, show_file_owner => 1, show_file_group => 0, datetimeformat => "%d.%m.%Y %H:%M:%S", new_is_max_sec => 86400 * 5, }); sub handler { my $r = shift; my $d = $dir->dirinfo($r->uri); return 1; } #------------------------------------------------------
From: OPITZ [...] cpan.org
Hi Andi! On Mo. 14. Aug. 2006, 08:24:51, andi wrote: Show quoted text
> when I use Dir::List in a mod_perl environment, I get cached results > for the second and furthermore calls to dirinfo. This problem exists > if you instantiate Dir::List only one time, and call it serveral > times. (call to sub handler in listing) > > I think this is because "$self->{list}" isn't deleted at the start of > sub dirinfo.
Have you tried fixing it? If so, can you send me a patch? I can only guess what you are trying to do... Have you had a look at FileLister? (http://filelister.linux-kernel.at/)? Nice tool that might do a lot of work for your... :-)
From: andreas.huber [...] mnet-online.de
Show quoted text
> > Have you tried fixing it? If so, can you send me a patch?
Hi Oliver, see attached List.pm. Look at line 71. On each call to dirinfo, $self->{list} will be deleted first. Thus, no old files or/and dirs were cached. Andi

Message body is not shown because it is too large.

From: OPITZ [...] cpan.org
On Mi. 16. Aug. 2006, 05:02:21, andi wrote: Show quoted text
> > Have you tried fixing it? If so, can you send me a patch?
> > Hi Oliver, > > see attached List.pm. Look at line 71. > > On each call to dirinfo, $self->{list} will be deleted first. Thus, no > old files or/and dirs were cached.
OK. Fixed in Version 1.4. Will release it in a hurry. -- Oliver Falk UNIX/Linux Systems Administrator