| 1 | package Devel::IPerl::Display::IFrame; | ||||||||||
| 2 | 2 | $Devel::IPerl::Display::IFrame::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 | has [ qw[width height] ] => ( is => 'rw', predicate => 1 ); | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | sub iperl_data_representations { | ||||||||
|
Subroutine
iperl_data_representations: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 12 | 0 | my ($self) = @_; | |||||||||
| 13 | 0 | ▶ | return unless $self->uri; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | my $html = <<"HTML"; | |||||||||
| 15 | <iframe | ||||||||||
| 16 | 0 | ▶ | @{[ $self->has_width ? (qq|width="@{[$self->width]}"|) : "" ]} | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | ▶ | @{[ $self->has_height ? (qq|height="@{[$self->height]}"|): "" ]} | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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 | 2 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||