Debian Codegraph @

lemonldap-ng-common/lib/Lemonldap/NG/Common/Module.pm

raw
1 package Lemonldap::NG::Common::Module;
2
3 use strict;
4 use Mouse;
5
6 our $VERSION = '2.19.0';
7
8 # Object that provides loggers and error methods (typically PSGI object)
9 has p => ( is => 'rw', weak_ref => 1 );
10
11 # Lemonldap::NG configuration hash ref
12 has conf => ( is => 'rw', weak_ref => 1 );
13
14 has logger => ( is => 'rw', lazy => 1, default => sub { $_[0]->{p}->logger } );
15 has userLogger =>
16 ( is => 'rw', lazy => 1, default => sub { $_[0]->{p}->userLogger } );
17
18 sub auditLog {
19 my $self = shift;
20 return $self->p->auditLog(@_);
21 }
22
23 sub error {
24 my $self = shift;
25 return $self->p->error(@_);
26 }
27
28 1;