| 1 | package PlugAuth::Role::Plugin; | ||||||||||
| 2 | |||||||||||
| 3 | 41 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 41 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 41 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 41 | ▶ | use Role::Tiny; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | # ABSTRACT: Role for PlugAuth plugins | ||||||||||
| 9 | 41 | our $VERSION = '0.39'; # VERSION | |||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | sub init { } | ||||||||
|
Subroutine
init: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 13 | |||||||||||
| 14 | |||||||||||
| 15 | 41 | my $config; | |||||||||
| 16 | |||||||||||
| 17 | sub global_config | ||||||||||
| 18 | 0 | ▶ | { | ||||||||
|
Subroutine
global_config: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 19 | 0 | $config; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | sub plugin_config | ||||||||||
| 24 | 0 | ▶ | { | ||||||||
|
Subroutine
plugin_config: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 25 | 0 | shift->{plugin_config}; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | |||||||||||
| 29 | my $app; | ||||||||||
| 30 | |||||||||||
| 31 | sub app | ||||||||||
| 32 | 0 | ▶ | { | ||||||||
|
Subroutine
app: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 33 | 0 | $app; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | sub new | ||||||||||
| 37 | 0 | ▶ | { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 38 | 0 | my($class, $global_config, $plugin_config, $theapp) = @_; | |||||||||
| 39 | 0 | $app = $theapp; | |||||||||
| 40 | 0 | $config = $global_config; | |||||||||
| 41 | 0 | my $self = bless { | |||||||||
| 42 | plugin_config => $plugin_config, | ||||||||||
| 43 | }, $class; | ||||||||||
| 44 | 0 | $self->init; | |||||||||
| 45 | 0 | $self; | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | # undocumented, may go away. | ||||||||||
| 49 | sub _self_auth_plugin | ||||||||||
| 50 | 23 | ▶ | { | ||||||||
|
Subroutine
_self_auth_plugin: called CC=2 SCAR=7.0
| |||||||||||
| 51 | 23 | my($class, $new_value) = @_; | |||||||||
| 52 | |||||||||||
| 53 | 23 | state $plugin; | |||||||||
| 54 | |||||||||||
| 55 | 23 | ▶ | $plugin = $new_value if defined $new_value; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 56 | |||||||||||
| 57 | 23 | return $plugin; | |||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | 41 | 1; | |||||||||
| 61 | |||||||||||
| 62 | __END__ | ||||||||||