File Coverage

blib/lib/HTML/Mason/Plugin/Context.pm
Criterion Covered Total %
statement 27 41 65.8
branch 0 4 0.0
condition n/a
subroutine 15 23 65.2
pod n/a
total 42 68 61.7


line stmt bran cond sub pod time code
1             package HTML::Mason::Plugin::Context;
2             $HTML::Mason::Plugin::Context::VERSION = '1.60';
3 32     32   207 use strict;
  32         62  
  32         895  
4 32     32   152 use warnings;
  32         60  
  32         1477  
5              
6             #------------------------------------------------------------
7              
8             package HTML::Mason::Plugin::Context::StartRequest;
9             $HTML::Mason::Plugin::Context::StartRequest::VERSION = '1.60';
10 32     32   200 use base qw(HTML::Mason::Plugin::Context);
  32         57  
  32         8165  
11              
12 8     8   84 sub request { $_[0]->[0] }
13             sub args {
14 0 0   0   0 if (wantarray) {
15 0         0 return @{$_[0]->[1]};
  0         0  
16             } else {
17 0         0 return $_[0]->[1];
18             }
19             }
20              
21             #------------------------------------------------------------
22              
23             package HTML::Mason::Plugin::Context::EndRequest;
24             $HTML::Mason::Plugin::Context::EndRequest::VERSION = '1.60';
25 32     32   230 use base qw(HTML::Mason::Plugin::Context);
  32         65  
  32         9256  
26              
27 8     8   61 sub request { $_[0]->[0] }
28             sub args {
29 0 0   0   0 if (wantarray) {
30 0         0 return @{$_[0]->[1]};
  0         0  
31             } else {
32 0         0 return $_[0]->[1];
33             }
34             }
35 1     1   9 sub output { $_[0]->[2] }
36 0     0   0 sub wantarray { $_[0]->[3] }
37 2     2   15 sub result { $_[0]->[4] }
38 1     1   8 sub error { $_[0]->[5] }
39              
40             #------------------------------------------------------------
41              
42             package HTML::Mason::Plugin::Context::StartComponent;
43             $HTML::Mason::Plugin::Context::StartComponent::VERSION = '1.60';
44 32     32   238 use base qw(HTML::Mason::Plugin::Context);
  32         69  
  32         6103  
45              
46 0     0   0 sub request { $_[0]->[0] }
47 41     41   288 sub comp { $_[0]->[1] }
48 0     0   0 sub args { $_[0]->[2] }
49              
50             #------------------------------------------------------------
51              
52             package HTML::Mason::Plugin::Context::EndComponent;
53             $HTML::Mason::Plugin::Context::EndComponent::VERSION = '1.60';
54 32     32   241 use base qw(HTML::Mason::Plugin::Context);
  32         65  
  32         6934  
55              
56 0     0   0 sub request { $_[0]->[0] }
57 43     43   256 sub comp { $_[0]->[1] }
58 0     0   0 sub args { $_[0]->[2] }
59 0     0   0 sub wantarray { $_[0]->[3] }
60 4     4   27 sub result { $_[0]->[4] }
61 2     2   14 sub error { $_[0]->[5] }
62              
63             #------------------------------------------------------------
64              
65             1;
66              
67             __END__