File Coverage

blib/lib/Gnuplot/Builder/Util.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             package Gnuplot::Builder::Util;
2 57     57   316 use strict;
  57         95  
  57         2201  
3 57     57   243 use warnings;
  57         100  
  57         3809  
4 57     57   219 use Exporter qw(import);
  57         75  
  57         7513  
5              
6             our @EXPORT_OK = qw(quote_gnuplot_str);
7              
8             sub quote_gnuplot_str {
9 139     139 0 249 my ($str) = @_;
10 139 100       255 return undef if !defined($str);
11 131         178 $str = "$str"; ## explicit stringification
12 131         300 $str =~ s/'/''/g;
13 131         491 return qq{'$str'};
14             }
15              
16             1;