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