line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl -T |
2
|
|
|
|
|
|
|
######### |
3
|
|
|
|
|
|
|
# Author: rmp |
4
|
|
|
|
|
|
|
# Maintainer: $Author: rmp $ |
5
|
|
|
|
|
|
|
# Created: 2008-12-01 |
6
|
|
|
|
|
|
|
# Last Modified: $Date$ |
7
|
|
|
|
|
|
|
# Id: $Id$ |
8
|
|
|
|
|
|
|
# $HeadURL$ |
9
|
|
|
|
|
|
|
# |
10
|
2
|
|
|
2
|
|
2863
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
81
|
|
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
12
|
2
|
|
|
2
|
|
2018
|
use GD::Sparkline; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use CGI; |
14
|
|
|
|
|
|
|
use Carp; |
15
|
|
|
|
|
|
|
use English qw(-no_match_vars); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = do { my ($r) = q$Revision: 0.01 $ =~ /(\d+)/smx; $r; }; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $cgi = CGI->new(); |
20
|
|
|
|
|
|
|
my $cfg = { map { $_ => $cgi->param($_) || q[] } GD::Sparkline->fields() }; |
21
|
|
|
|
|
|
|
my $gd = GD::Sparkline->new($cfg); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
if(!$cgi->param('suppress')) { |
24
|
|
|
|
|
|
|
print "Content-type:image/png\n\n" or croak $ERRNO; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
print $gd->draw() or croak $ERRNO; |