Devel/IPerl/Display/JS.pm

filter: Statementstmt 100% 20 / 20 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 93.1% 27 / 29 CC 3 SCAR 6.9
CC
3
Cov
96%
iperl_data_representations
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Devel/IPerl/Display/CSS.pm ↑ Summary Devel/IPerl/Plugin/DocDisplay.pm »
1 package Devel::IPerl::Display::JS;
2 2 $Devel::IPerl::Display::JS::VERSION = '0.012';
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 with qw(Devel::IPerl::Display::Role::Displayable Devel::IPerl::Display::Role::Source);
8  
9 2 ▶sub iperl_data_representations {
Subroutine iperl_data_representations: called CC=3 SCAR=11.0
Pod undocumented
10 2 my ($self) = @_;
11 2 my $html;
12 2 ▶ if( $self->uri ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($self->uri) { } 1 1 2
elsif ($self->bytestream) { } 1 0 1
13 1 $html = <<"HTML";
14 1 <script src="@{[$self->uri]}" type="text/javascript"></script>
15 HTML
16 } elsif( $self->bytestream ) {
17 1 $html = <<"HTML";
18 <script type="text/javascript">
19 1 @{[ $self->bytestream ]}
20 </script>
21 HTML
22 }
23 return {
24 2 "text/html" => $html,
25 };
26 }
27  
28 2 1;
29  
30 __END__
« Devel/IPerl/Display/CSS.pm ↑ Summary Devel/IPerl/Plugin/DocDisplay.pm »