bin/sparkline

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary blib/lib/GD/Sparkline.pm »
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;
↑ Summary blib/lib/GD/Sparkline.pm »