line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Journal::ImpactFactor; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
14429
|
use v5.12; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
21
|
|
6
|
1
|
|
|
1
|
|
181
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use namespace::autoclean; |
8
|
|
|
|
|
|
|
use Storable; |
9
|
|
|
|
|
|
|
use Journal::JournalEntry; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has 'journal_list' => ( |
14
|
|
|
|
|
|
|
is => 'rw', |
15
|
|
|
|
|
|
|
isa => 'ArrayRef[Journal::JournalEntry]', |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub BUILD { |
20
|
|
|
|
|
|
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $hashref = retrieve('journals') or die "[Error]: Could not find journal list"; |
23
|
|
|
|
|
|
|
my %journals = %{$hashref}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $j; |
26
|
|
|
|
|
|
|
my @list; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
for my $key ( keys %journals ) { |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$j = Journal::JournalEntry->new(); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my @line = split(/\t/, $journals{$key}); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$j->name($line[0]) if defined ($line[0]); |
35
|
|
|
|
|
|
|
$j->issn($line[1]) if defined ($line[1]); |
36
|
|
|
|
|
|
|
$j->year_2008($line[2]) if defined ($line[2]); |
37
|
|
|
|
|
|
|
$j->year_2009($line[3]) if defined ($line[3]); |
38
|
|
|
|
|
|
|
$j->year_2010($line[4]) if defined ($line[4]); |
39
|
|
|
|
|
|
|
$j->year_2011($line[5]) if defined ($line[5]); |
40
|
|
|
|
|
|
|
$j->year_2012($line[6]) if defined ($line[6]); |
41
|
|
|
|
|
|
|
$j->year_2013_2014($line[7]) if defined ($line[7]); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
push(@list, $j); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
$self->journal_list(\@list); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub search_by_name { |
50
|
|
|
|
|
|
|
my $self = shift; |
51
|
|
|
|
|
|
|
my $name = shift; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my @list = @{$self->journal_list}; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $result; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
for my $j ( @list ) { |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
if ( $j->name =~ m/^$name$/ig ) { |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
$result = $j; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
if ($result) { |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
return $result; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
} else { |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
say "Journal not found"; |
72
|
|
|
|
|
|
|
return undef; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub search_by_issn { |
79
|
|
|
|
|
|
|
my $self = shift; |
80
|
|
|
|
|
|
|
my $issn = shift; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
my @list = @{$self->journal_list}; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
my $result; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
for my $j ( @list ) { |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
if ( $j->issn =~ m/^$issn$/ig ) { |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
$result = $j; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
if ($result) { |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
return $result; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
} else { |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
say "Journal not found"; |
101
|
|
|
|
|
|
|
return undef; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |