lib/CGI/OptimalQuery/CustomOutput.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 19 | 78.9 |
branch | 0 | 2 | 0.0 |
condition | 0 | 3 | 0.0 |
subroutine | 5 | 6 | 83.3 |
pod | 0 | 1 | 0.0 |
total | 20 | 31 | 64.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package CGI::OptimalQuery::CustomOutput; | ||||||
2 | |||||||
3 | 1 | 1 | 568 | use strict; | |||
1 | 1 | ||||||
1 | 23 | ||||||
4 | 1 | 1 | 2 | use warnings; | |||
1 | 2 | ||||||
1 | 20 | ||||||
5 | 1 | 1 | 3 | no warnings qw( uninitialized ); | |||
1 | 1 | ||||||
1 | 23 | ||||||
6 | 1 | 1 | 2 | use base 'CGI::OptimalQuery::Base'; | |||
1 | 1 | ||||||
1 | 51 | ||||||
7 | 1 | 1 | 4 | use CGI(); | |||
1 | 1 | ||||||
1 | 62 | ||||||
8 | |||||||
9 | our $custom_output_handler; | ||||||
10 | |||||||
11 | sub output { | ||||||
12 | 0 | 0 | 0 | my $o = shift; | |||
13 | 0 | 0 | my $codeRef = $$o{custom_output_handler} || $custom_output_handler; | ||||
14 | 0 | 0 | $codeRef->($o) if $codeRef; | ||||
15 | 0 | $o->finish(); | |||||
16 | } | ||||||
17 | |||||||
18 | 1; |