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