line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::COUNTER::Report::Release2::DatabaseReport3; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1651
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
48
|
|
4
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use Biblio::COUNTER::Report qw(REQUESTS SEARCHES SESSIONS MAY_BE_BLANK NOT_BLANK EXACT_MATCH); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
531
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
@Biblio::COUNTER::Report::Release2::DatabaseReport3::ISA = qw(Biblio::COUNTER::Report); |
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
0
|
0
|
|
sub canonical_report_name { 'Database Report 3 (R2)' } |
11
|
0
|
|
|
0
|
0
|
|
sub canonical_report_description { 'Total Searches and Sessions by Month and Service' } |
12
|
0
|
|
|
0
|
0
|
|
sub canonical_report_code { 'DB3' } |
13
|
0
|
|
|
0
|
0
|
|
sub release_number { 2 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub process_header_rows { |
16
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Report name and title |
19
|
0
|
|
|
|
|
|
$self->begin_row |
20
|
|
|
|
|
|
|
->check_report_name |
21
|
|
|
|
|
|
|
->check_report_description |
22
|
|
|
|
|
|
|
->end_row; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Report criteria |
25
|
0
|
|
|
|
|
|
$self->begin_row |
26
|
|
|
|
|
|
|
->check_report_criteria |
27
|
|
|
|
|
|
|
->end_row; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Date run label |
30
|
0
|
|
|
|
|
|
$self->begin_row |
31
|
|
|
|
|
|
|
->check_label('Date run:') |
32
|
|
|
|
|
|
|
->end_row; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Date run |
35
|
0
|
|
|
|
|
|
$self->begin_row |
36
|
|
|
|
|
|
|
->check_date_run |
37
|
|
|
|
|
|
|
->end_row; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# Data column labels |
40
|
0
|
|
|
|
|
|
$self->begin_row |
41
|
|
|
|
|
|
|
->check_blank |
42
|
|
|
|
|
|
|
->check_label('Platform', qr/^(?i)plat/) |
43
|
|
|
|
|
|
|
->check_blank |
44
|
|
|
|
|
|
|
->check_period_labels |
45
|
|
|
|
|
|
|
->check_label('YTD Total') |
46
|
|
|
|
|
|
|
->end_row; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub process_record { |
50
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# First row -- searches run |
53
|
0
|
|
|
|
|
|
$self->begin_row; |
54
|
0
|
0
|
|
|
|
|
return if $self->_eof; |
55
|
0
|
|
|
|
|
|
$self->check_title(NOT_BLANK) |
56
|
|
|
|
|
|
|
->check_platform(NOT_BLANK) |
57
|
|
|
|
|
|
|
->check_label('Searches run') |
58
|
|
|
|
|
|
|
->check_count_by_periods(SEARCHES) |
59
|
|
|
|
|
|
|
->check_ytd_total |
60
|
|
|
|
|
|
|
->end_row; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# Fields that must be the same in the second row as in the first |
63
|
0
|
|
|
|
|
|
my $record = $self->{'record'}; |
64
|
0
|
|
|
|
|
|
my ($title, $platform) = @$record{qw(title platform)}; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
# Second row -- sessions |
67
|
0
|
|
|
|
|
|
$self->begin_row |
68
|
|
|
|
|
|
|
->check_title(EXACT_MATCH, $title) |
69
|
|
|
|
|
|
|
->check_platform(EXACT_MATCH, $platform) |
70
|
|
|
|
|
|
|
->check_label('Sessions') |
71
|
|
|
|
|
|
|
->check_count_by_periods(SESSIONS) |
72
|
|
|
|
|
|
|
->check_ytd_total |
73
|
|
|
|
|
|
|
->end_row; |
74
|
|
|
|
|
|
|
|
75
|
0
|
0
|
|
|
|
|
$self->blank_row unless $self->_eof; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=pod |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 NAME |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Biblio::COUNTER::Report::Release2::DatabaseReport3 - a DB3 (R2) COUNTER report |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 SYNOPSIS |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
$report = Biblio::COUNTER::Report::Release2::DatabaseReport3->new( |
89
|
|
|
|
|
|
|
'file' => $file, |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
$report->process; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |