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