line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
$Devel::IPerl::Display::JS::VERSION = '0.012'; |
2
|
|
|
|
|
|
|
use strict; |
3
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
use Moo; |
6
|
2
|
|
|
2
|
|
8
|
with qw(Devel::IPerl::Display::Role::Displayable Devel::IPerl::Display::Role::Source); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my ($self) = @_; |
9
|
|
|
|
|
|
|
my $html; |
10
|
2
|
|
|
2
|
0
|
26
|
if( $self->uri ) { |
11
|
2
|
|
|
|
|
5
|
$html = <<"HTML"; |
12
|
2
|
100
|
|
|
|
10
|
<script src="@{[$self->uri]}" type="text/javascript"></script> |
|
|
50
|
|
|
|
|
|
13
|
1
|
|
|
|
|
2
|
HTML |
14
|
1
|
|
|
|
|
6
|
} elsif( $self->bytestream ) { |
15
|
|
|
|
|
|
|
$html = <<"HTML"; |
16
|
|
|
|
|
|
|
<script type="text/javascript"> |
17
|
1
|
|
|
|
|
2
|
@{[ $self->bytestream ]} |
18
|
|
|
|
|
|
|
</script> |
19
|
1
|
|
|
|
|
5
|
HTML |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
return { |
22
|
|
|
|
|
|
|
"text/html" => $html, |
23
|
|
|
|
|
|
|
}; |
24
|
2
|
|
|
|
|
6
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding UTF-8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Devel::IPerl::Display::JS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 VERSION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
version 0.012 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 AUTHOR |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Zakariyya Mughal <zmughal@cpan.org> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This software is copyright (c) 2014 by Zakariyya Mughal. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
50
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |