line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::JavaScript::Console; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: use the JavaScript console from Mojolicious applications |
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
4778
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
184
|
|
6
|
6
|
|
|
6
|
|
31
|
use warnings; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
196
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
29
|
use Mojo::Base qw(Mojolicious::Plugin); |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
49
|
|
9
|
6
|
|
|
6
|
|
5652
|
use JavaScript::Console; |
|
6
|
|
|
|
|
5272
|
|
|
6
|
|
|
|
|
848
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 0.01; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub register { |
14
|
6
|
|
|
6
|
1
|
251
|
my ($plugin, $mojo, $param) = @_; |
15
|
|
|
|
|
|
|
|
16
|
6
|
50
|
|
|
|
12
|
my $console = JavaScript::Console->new( %{ $param || {} } ); |
|
6
|
|
|
|
|
44
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$mojo->helper( |
19
|
|
|
|
|
|
|
'console' => sub { |
20
|
14
|
|
|
14
|
|
280871
|
$console; |
21
|
|
|
|
|
|
|
} |
22
|
6
|
|
|
|
|
133
|
); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |