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 | 720 | use strict; | |||
1 | 2 | ||||||
1 | 23 | ||||||
4 | 1 | 1 | 10 | use warnings; | |||
1 | 2 | ||||||
1 | 21 | ||||||
5 | 1 | 1 | 4 | no warnings qw( uninitialized ); | |||
1 | 2 | ||||||
1 | 22 | ||||||
6 | 1 | 1 | 4 | use base 'CGI::OptimalQuery::Base'; | |||
1 | 2 | ||||||
1 | 79 | ||||||
7 | 1 | 1 | 5 | use CGI(); | |||
1 | 2 | ||||||
1 | 75 | ||||||
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; |