| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Mango::BSON::Code; |
|
2
|
11
|
|
|
11
|
|
73
|
use Mojo::Base -base; |
|
|
11
|
|
|
|
|
24
|
|
|
|
11
|
|
|
|
|
67
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
has [qw(code scope)]; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
1; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=encoding utf8 |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Mango::BSON::Code - Code type |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Mango::BSON::Code; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $code = Mango::BSON::Code->new(code => 'function () {}'); |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
L is a container for the BSON code type used by |
|
23
|
|
|
|
|
|
|
L. |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
L implements the following attributes. |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 code |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $js = $code->code; |
|
32
|
|
|
|
|
|
|
$code = $code->code('function () {}'); |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
JavaScript code. |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 scope |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $scode = $code->scope; |
|
39
|
|
|
|
|
|
|
$code = $code->scope({foo => 'bar'}); |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Scope. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 METHODS |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
L inherits all methods from L. |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
L, L, L. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |