File Coverage

blib/lib/Catalyst/Authentication/Realm/Compatibility.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition 1 2 50.0
subroutine 4 4 100.0
pod 1 1 100.0
total 21 22 95.4


line stmt bran cond sub pod time code
1             package Catalyst::Authentication::Realm::Compatibility;
2              
3 1     1   769 use strict;
  1         4  
  1         45  
4 1     1   6 use warnings;
  1         2  
  1         77  
5              
6 1     1   6 use base qw/Catalyst::Authentication::Realm/;
  1         2  
  1         277  
7              
8             ## very funky - the problem here is that we can't do real realm initialization
9             ## but we need a real realm object to function. So - we kinda fake it - we
10             ## create an empty object -
11             sub new {
12 1     1 1 4 my ($class, $realmname, $config, $app) = @_;
13              
14 1         3 my $self = { config => $config };
15 1         3 bless $self, $class;
16              
17 1   50     8 $self->config->{'use_session'} = $app->config->{'Plugin::Authentication'}{'use_session'} || '1';
18 1         8329 $self->name($realmname);
19              
20 1         540 return $self;
21             }
22              
23             __PACKAGE__;
24              
25             __END__
26              
27             =pod
28              
29             =head1 NAME
30              
31             Catalyst::Authentication::Realm::Compatibility - Compatibility realm object
32              
33             =head1 DESCRIPTION
34              
35             An empty realm object for compatibility reasons.
36              
37             =head1 METHODS
38              
39             =head2 new( )
40              
41             Returns a, basically empty, realm object.
42              
43             =cut