File Coverage

blib/lib/Devel/IPerl/Display/CSS.pm
Criterion Covered Total %
statement 17 18 94.4
branch 3 4 75.0
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 24 28 85.7


line stmt bran cond sub pod time code
1             $Devel::IPerl::Display::CSS::VERSION = '0.012';
2             use strict;
3 2     2   12 use warnings;
  2         3  
  2         54  
4 2     2   10  
  2         3  
  2         42  
5             use Moo;
6 2     2   9 with qw(Devel::IPerl::Display::Role::Displayable Devel::IPerl::Display::Role::Source);
  2         2  
  2         10  
7              
8             my ($self) = @_;
9 0     0   0 my $html;
10             if( $self->uri ) {
11 2     2 0 28 $html = <<"HTML";
12 2         3 <link rel="stylesheet" href="@{[$self->uri]}" type="text/css">
13 2 100       7 HTML
    50          
14 1         2 } elsif( $self->bytestream ) {
15 1         5 $html = <<"HTML";
16             <stylesheet type="text/css">
17             @{[ $self->bytestream ]}
18 1         2 </stylesheet>
19             HTML
20 1         5 }
21             return {
22             "text/html" => $html,
23             };
24             }
25 2         7  
26             1;
27              
28              
29             =pod
30              
31             =encoding UTF-8
32              
33             =head1 NAME
34              
35             Devel::IPerl::Display::CSS
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