3 |
# based on post |
# based on post |
4 |
# http://www.mail-archive.com/libwww@perl.org/msg04750.html |
# http://www.mail-archive.com/libwww@perl.org/msg04750.html |
5 |
|
|
6 |
|
BEGIN { |
7 |
|
my $basedir = readlink($0) || $0; $basedir =~ s#/[^/]+$##; |
8 |
|
unshift(@INC, $basedir); |
9 |
|
} |
10 |
|
|
11 |
use strict; |
use strict; |
12 |
use warnings; |
use warnings; |
13 |
use MWS::SWISH; |
use MWS::SWISH; |
111 |
|
|
112 |
# XXX LOG |
# XXX LOG |
113 |
print $r->method," ",$url,"\n"; |
print $r->method," ",$url,"\n"; |
114 |
print Dumper($param),"\n" if ($debug); |
print Dumper($param,$mws->{counter}),"\n" if ($debug); |
115 |
|
|
116 |
# is this static page? |
# is this static page? |
117 |
if ($static_html && -f "$static_html/$url") { |
if ($static_html && -f "$static_html/$url") { |
208 |
|
|
209 |
|
|
210 |
# push counters to template |
# push counters to template |
211 |
foreach my $f (qw(from to cc bcc)) { |
foreach my $f (qw(from to cc bcc folder)) { |
212 |
my $h = $mws->counter($f) || next; |
my $h = $mws->counter($f) || next; |
213 |
my @a; |
my @a; |
214 |
foreach my $k (sort { $h->{$b}->{usage} <=> $h->{$a}->{usage} } keys %$h) { |
foreach my $k (sort { $h->{$b}->{usage} <=> $h->{$a}->{usage} } keys %$h) { |