line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::App::Login::Password; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
152614
|
use base qw(Plack::Component::Tags::HTML); |
|
4
|
|
|
|
|
25
|
|
|
4
|
|
|
|
|
2186
|
|
4
|
4
|
|
|
4
|
|
284350
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
87
|
|
5
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
126
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
27
|
use Plack::Util::Accessor qw(generator register_link title); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
28
|
|
8
|
4
|
|
|
4
|
|
2211
|
use Tags::HTML::Container; |
|
4
|
|
|
|
|
4352
|
|
|
4
|
|
|
|
|
119
|
|
9
|
4
|
|
|
4
|
|
2116
|
use Tags::HTML::Login::Access; |
|
4
|
|
|
|
|
5337
|
|
|
4
|
|
|
|
|
1002
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 0.01; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _css { |
14
|
3
|
|
|
3
|
|
910
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
|
|
14
|
$self->{'_container'}->process_css; |
17
|
3
|
|
|
|
|
820
|
$self->{'_login_access'}->process_css; |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
5082
|
return; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _prepare_app { |
23
|
5
|
|
|
5
|
|
34192
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Defaults which rewrite defaults in module which I am inheriting. |
26
|
5
|
100
|
|
|
|
18
|
if (! defined $self->generator) { |
27
|
4
|
|
|
|
|
108
|
$self->generator(__PACKAGE__.'; Version: '.$VERSION); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
5
|
100
|
|
|
|
55
|
if (! defined $self->title) { |
31
|
4
|
|
|
|
|
26
|
$self->title('Login page'); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Inherite defaults. |
35
|
5
|
|
|
|
|
45
|
$self->SUPER::_prepare_app; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Defaults from this module. |
38
|
3
|
|
|
|
|
2301
|
my %p = ( |
39
|
|
|
|
|
|
|
'css' => $self->css, |
40
|
|
|
|
|
|
|
'tags' => $self->tags, |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# Tags helper for login button. |
44
|
3
|
|
|
|
|
34
|
$self->{'_login_access'} = Tags::HTML::Login::Access->new( |
45
|
|
|
|
|
|
|
%p, |
46
|
|
|
|
|
|
|
'register_url' => $self->register_link, |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
3
|
|
|
|
|
503
|
$self->{'_container'} = Tags::HTML::Container->new( |
50
|
|
|
|
|
|
|
%p, |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
3
|
|
|
|
|
469
|
return; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub _tags_middle { |
57
|
3
|
|
|
3
|
|
13752
|
my $self = shift; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$self->{'_container'}->process( |
60
|
|
|
|
|
|
|
sub { |
61
|
3
|
|
|
3
|
|
2134
|
$self->{'_login_access'}->process; |
62
|
|
|
|
|
|
|
}, |
63
|
3
|
|
|
|
|
37
|
); |
64
|
|
|
|
|
|
|
|
65
|
3
|
|
|
|
|
22670
|
return; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |