File Coverage

blib/lib/Aozora2Epub/Gensym.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 20 22 90.9


line stmt bran cond sub pod time code
1             package Aozora2Epub::Gensym;
2 6     6   41 use strict;
  6         13  
  6         241  
3 6     6   27 use warnings;
  6         13  
  6         324  
4 6     6   31 use utf8;
  6         9  
  6         41  
5 6     6   212 use base qw/Exporter/;
  6         13  
  6         693  
6             our @EXPORT = qw(gensym);
7              
8             our $VERSION = '0.05';
9              
10             my $gensym_counter = 0;
11              
12 56     56 0 518 sub gensym { sprintf("g%09d", $gensym_counter++); }
13              
14             sub reset_counter {
15 40     40 0 1289732 $gensym_counter = 0;
16             }
17              
18             1;