File Coverage

blib/lib/Biblio/COUNTER/Report/Release2/JournalReport1.pm
Criterion Covered Total %
statement 9 25 36.0
branch n/a
condition n/a
subroutine 3 9 33.3
pod 0 6 0.0
total 12 40 30.0


line stmt bran cond sub pod time code
1             package Biblio::COUNTER::Report::Release2::JournalReport1;
2              
3 1     1   1167 use strict;
  1         2  
  1         40  
4 1     1   5 use warnings;
  1         2  
  1         37  
5              
6 1     1   5 use Biblio::COUNTER::Report qw(REQUESTS MAY_BE_BLANK NOT_BLANK);
  1         2  
  1         796  
7              
8             @Biblio::COUNTER::Report::Release2::JournalReport1::ISA = qw(Biblio::COUNTER::Report);
9              
10 0     0 0   sub canonical_report_name { 'Journal Report 1 (R2)' }
11 0     0 0   sub canonical_report_description { 'Number of Successful Full-Text Article Requests by Month and Journal' };
12 0     0 0   sub canonical_report_code { 'JR1' }
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('Publisher', qr/^(?i)pub/)
43             ->check_label('Platform', qr/^(?i)plat/)
44             ->check_label('Print ISSN', qr/^(?i)print issn/)
45             ->check_label('Online ISSN', qr/^(?i)online issn/)
46             ->check_period_labels
47             ->check_label('YTD Total')
48             ->check_label('YTD HTML')
49             ->check_label('YTD PDF')
50             ->end_row;
51            
52             # Data summary
53 0           $self->begin_row
54             ->check_label('Total for all journals')
55             ->check_publisher(MAY_BE_BLANK)
56             ->check_platform(MAY_BE_BLANK)
57             ->check_blank
58             ->check_blank
59             ->check_count_by_periods(REQUESTS)
60             ->check_ytd_total(REQUESTS)
61             ->check_ytd_html(REQUESTS)
62             ->check_ytd_pdf(REQUESTS)
63             ->end_row;
64            
65             }
66              
67             sub process_record {
68 0     0 0   my ($self) = @_;
69 0           $self->begin_row
70             ->check_title(NOT_BLANK)
71             ->check_publisher(MAY_BE_BLANK)
72             ->check_platform(NOT_BLANK)
73             ->check_print_issn
74             ->check_online_issn;
75 0           $self->check_count_by_periods(REQUESTS);
76 0           $self->check_ytd_total;
77 0           $self->check_ytd_html
78             ->check_ytd_pdf
79             ->end_row;
80             }
81              
82             1;
83              
84             =pod
85              
86             =head1 NAME
87              
88             Biblio::COUNTER::Report::Release2::JournalReport1 - a JR1 (R2) COUNTER report
89              
90             =head1 SYNOPSIS
91              
92             $report = Biblio::COUNTER::Report::Release2::JournalReport1->new(
93             'file' => $file,
94             );
95             $report->process;
96              
97             =cut