| 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 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 0 | ▶ | use GD::Sparkline; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 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; | ||