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   368 use strict;
  57         130  
  57         2745  
3 57     57   368 use warnings;
  57         2328  
  57         3341  
4 57     57   345 use Exporter qw(import);
  57         106  
  57         9927  
5              
6             our @EXPORT_OK = qw(quote_gnuplot_str);
7              
8             sub quote_gnuplot_str {
9 139     139 0 299 my ($str) = @_;
10 139 100       362 return undef if !defined($str);
11 131         245 $str = "$str"; ## explicit stringification
12 131         312 $str =~ s/'/''/g;
13 131         612 return qq{'$str'};
14             }
15              
16             1;