File Coverage

blib/lib/Devel/IPerl/Plugin/WebDisplay.pm
Criterion Covered Total %
statement 27 31 87.1
branch n/a
condition n/a
subroutine 11 13 84.6
pod 0 5 0.0
total 38 49 77.5


line stmt bran cond sub pod time code
1             package Devel::IPerl::Plugin::WebDisplay;
2             $Devel::IPerl::Plugin::WebDisplay::VERSION = '0.008';
3 2     2   11 use strict;
  2         4  
  2         76  
4 2     2   12 use warnings;
  2         22  
  2         54  
5              
6 2     2   651 use Devel::IPerl::Display::HTML;
  2         6  
  2         84  
7 2     2   734 use Devel::IPerl::Display::JS;
  2         4  
  2         58  
8 2     2   627 use Devel::IPerl::Display::CSS;
  2         7  
  2         77  
9 2     2   611 use Devel::IPerl::Display::IFrame;
  2         7  
  2         440  
10              
11             sub register {
12 2     2 0 9 my ($self, $iperl) = @_;
13             # TODO generalise the plugin registration
14 2         7 for my $name (qw(html css js iframe)) {
15 8     4   43 $iperl->helper( $name => sub { shift; $self->$name(@_) } );
  4     4   5802  
  4         18  
16             }
17             }
18              
19 0     0 0 0 sub html { shift; Devel::IPerl::Display::HTML->new(@_) }
  0         0  
20 2     2 0 4 sub css { shift; Devel::IPerl::Display::CSS->new(@_) }
  2         29  
21 2     2 0 2 sub js { shift; Devel::IPerl::Display::JS->new(@_) }
  2         29  
22              
23 0     0 0   sub iframe { shift; Devel::IPerl::Display::IFrame->new(@_) }
  0            
24              
25             1;
26              
27             __END__
28              
29             =pod
30              
31             =encoding UTF-8
32              
33             =head1 NAME
34              
35             Devel::IPerl::Plugin::WebDisplay
36              
37             =head1 VERSION
38              
39             version 0.008
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