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
|
|
3545
|
use strict; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
188
|
|
6
|
6
|
|
|
6
|
|
27
|
use warnings; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
164
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
24
|
use Mojo::Base qw(Mojolicious::Plugin); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
43
|
|
9
|
6
|
|
|
6
|
|
3530
|
use JavaScript::Console; |
|
6
|
|
|
|
|
4363
|
|
|
6
|
|
|
|
|
687
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 0.02; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub register { |
14
|
6
|
|
|
6
|
1
|
229
|
my ($plugin, $mojo, $param) = @_; |
15
|
|
|
|
|
|
|
|
16
|
6
|
50
|
|
|
|
9
|
my $console = JavaScript::Console->new( %{ $param || {} } ); |
|
6
|
|
|
|
|
41
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$mojo->helper( |
19
|
|
|
|
|
|
|
'console' => sub { |
20
|
14
|
|
|
14
|
|
108805
|
$console; |
21
|
|
|
|
|
|
|
} |
22
|
6
|
|
|
|
|
113
|
); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |