line |
bran |
sub |
pod |
code |
1
|
|
|
|
package Sanger::CGP::Vcf::OutputGen::UuIdGenerator; |
2
|
|
|
|
|
3
|
|
|
|
##########LICENCE########## |
4
|
|
|
|
# Copyright (c) 2014,2015 Genome Research Ltd. |
5
|
|
|
|
# |
6
|
|
|
|
# Author: Jon Hinton <cgpit@sanger.ac.uk> |
7
|
|
|
|
# |
8
|
|
|
|
# This file is part of cgpVcf. |
9
|
|
|
|
# |
10
|
|
|
|
# cgpVcf is free software: you can redistribute it and/or modify it under |
11
|
|
|
|
# the terms of the GNU Affero General Public License as published by the Free |
12
|
|
|
|
# Software Foundation; either version 3 of the License, or (at your option) any |
13
|
|
|
|
# later version. |
14
|
|
|
|
# |
15
|
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
16
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
17
|
|
|
|
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
18
|
|
|
|
# details. |
19
|
|
|
|
# |
20
|
|
|
|
# You should have received a copy of the GNU Affero General Public License |
21
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
22
|
|
|
|
# |
23
|
|
|
|
# 1. The usage of a range of years within a copyright statement contained within |
24
|
|
|
|
# this distribution should be interpreted as being equivalent to a list of years |
25
|
|
|
|
# including the first and last year specified and all consecutive years between |
26
|
|
|
|
# them. For example, a copyright statement that reads âCopyright (c) 2005, 2007- |
27
|
|
|
|
# 2009, 2011-2012â should be interpreted as being identical to a statement that |
28
|
|
|
|
# reads âCopyright (c) 2005, 2007, 2008, 2009, 2011, 2012â and a copyright |
29
|
|
|
|
# statement that reads âCopyright (c) 2005-2012â should be interpreted as being |
30
|
|
|
|
# identical to a statement that reads âCopyright (c) 2005, 2006, 2007, 2008, |
31
|
|
|
|
# 2009, 2010, 2011, 2012â." |
32
|
|
|
|
########## LICENCE ########## |
33
|
|
|
|
|
34
|
|
1
|
|
use Sanger::CGP::Vcf; |
35
|
|
|
|
|
36
|
|
1
|
|
use strict; |
37
|
|
1
|
|
use Data::UUID; |
38
|
|
1
|
|
use warnings FATAL => 'all'; |
39
|
|
|
|
|
40
|
|
|
|
1; |
41
|
|
|
|
|
42
|
|
|
|
sub new{ |
43
|
|
1
|
0
|
my $proto = shift; |
44
|
|
|
|
my (%args) = @_; |
45
|
|
|
|
my $class = ref($proto) || $proto; |
46
|
|
|
|
|
47
|
|
|
|
my $self = { |
48
|
|
|
|
_gen => new Data::UUID, |
49
|
|
|
|
}; |
50
|
|
|
|
bless $self, $class; |
51
|
|
|
|
return $self; |
52
|
|
|
|
} |
53
|
|
|
|
|
54
|
|
|
|
sub next{ |
55
|
|
0
|
0
|
my $gen = shift->{_gen}; |
56
|
|
|
|
return lc $gen->to_string($gen->create); |
57
|
|
|
|
} |
58
|
|
|
|
|
59
|
|
0
|
0
|
sub reset{} |