File: Compatibility.pm

package info (click to toggle)
libcatalyst-plugin-authentication-perl 0.10023-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 604 kB
  • ctags: 307
  • sloc: perl: 3,672; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 858 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package Catalyst::Authentication::Realm::Compatibility;

use strict;
use warnings;

use base qw/Catalyst::Authentication::Realm/;

## very funky - the problem here is that we can't do real realm initialization
## but we need a real realm object to function.  So - we kinda fake it - we
## create an empty object -
sub new {
    my ($class, $realmname, $config, $app) = @_;

    my $self = { config => $config };
    bless $self, $class;

    $self->config->{'use_session'} = $app->config->{'Plugin::Authentication'}{'use_session'} || '1';
    $self->name($realmname);

    return $self;
}

__PACKAGE__;

__END__

=pod

=head1 NAME

Catalyst::Authentication::Realm::Compatibility - Compatibility realm object

=head1 DESCRIPTION

An empty realm object for compatibility reasons.

=head1 METHODS

=head2 new( )

Returns a, basically empty, realm object.

=cut