File Coverage

blib/lib/Devel/IPerl/Display/IFrame.pm
Criterion Covered Total %
statement 9 18 50.0
branch 0 6 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 29 41.3


line stmt bran cond sub pod time code
1             package Devel::IPerl::Display::IFrame;
2             $Devel::IPerl::Display::IFrame::VERSION = '0.007';
3 2     2   11 use strict;
  2         3  
  2         49  
4 2     2   9 use warnings;
  2         4  
  2         40  
5              
6 2     2   9 use Moo;
  2         4  
  2         8  
7             with qw(Devel::IPerl::Display::Role::Displayable Devel::IPerl::Display::Role::Source);
8              
9             has [ qw[width height] ] => ( is => 'rw', predicate => 1 );
10              
11             sub iperl_data_representations {
12 0     0 0   my ($self) = @_;
13 0 0         return unless $self->uri;
14 0           my $html = <<"HTML";
15             <iframe
16 0 0         @{[ $self->has_width ? (qq|width="@{[$self->width]}"|) : "" ]}
  0            
17 0 0         @{[ $self->has_height ? (qq|height="@{[$self->height]}"|): "" ]}
  0            
18 0           src="@{[$self->uri]}"
19             frameborder="0"
20             allowfullscreen
21             ></iframe>
22             HTML
23             return {
24 0           "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::IFrame
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