line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Notifications::Assets; |
2
|
10
|
|
|
10
|
|
77
|
use Mojo::Base -strict; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
74
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# Don't stringify, in case someone forgot to define an engine |
5
|
10
|
|
|
10
|
|
1591
|
use overload '""' => sub { '' }, fallback => 1; |
|
10
|
|
|
0
|
|
25
|
|
|
10
|
|
|
|
|
116
|
|
|
0
|
|
|
|
|
0
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Constructor |
9
|
|
|
|
|
|
|
sub new { |
10
|
10
|
|
|
10
|
1
|
55
|
bless { |
11
|
|
|
|
|
|
|
styles => [], |
12
|
|
|
|
|
|
|
scripts => [] |
13
|
|
|
|
|
|
|
}, shift; |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Get or add styles |
18
|
|
|
|
|
|
|
sub styles { |
19
|
27
|
|
|
27
|
1
|
54
|
my $self = shift; |
20
|
27
|
100
|
|
|
|
81
|
return sort @{ $self->{styles} } unless @_; |
|
21
|
|
|
|
|
295
|
|
21
|
6
|
|
|
|
|
10
|
push(@{$self->{styles}}, @_); |
|
6
|
|
|
|
|
119
|
|
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Get or add scripts |
26
|
|
|
|
|
|
|
sub scripts { |
27
|
25
|
|
|
25
|
1
|
54
|
my $self = shift; |
28
|
25
|
100
|
|
|
|
73
|
return sort @{ $self->{scripts} } unless @_; |
|
19
|
|
|
|
|
104
|
|
29
|
6
|
|
|
|
|
12
|
push(@{$self->{scripts}}, @_); |
|
6
|
|
|
|
|
20
|
|
30
|
|
|
|
|
|
|
}; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |