File Coverage

blib/lib/Devel/IPerl/Plugin/CoreDisplay.pm
Criterion Covered Total %
statement 25 31 80.6
branch n/a
condition n/a
subroutine 11 14 78.5
pod 0 5 0.0
total 36 50 72.0


line stmt bran cond sub pod time code
1             package Devel::IPerl::Plugin::CoreDisplay;
2             $Devel::IPerl::Plugin::CoreDisplay::VERSION = '0.007';
3 2     2   474 use strict;
  2         5  
  2         55  
4 2     2   9 use warnings;
  2         5  
  2         71  
5              
6 2     2   262 use Devel::IPerl::Display::PNG;
  2         14  
  2         74  
7 2     2   770 use Devel::IPerl::Display::SVG;
  2         6  
  2         67  
8 2     2   619 use Devel::IPerl::Display::JPEG;
  2         5  
  2         55  
9 2     2   567 use Devel::IPerl::Display::AudioMPEG;
  2         5  
  2         310  
10              
11             sub register {
12 2     2 0 6 my ($self, $iperl) = @_;
13             # TODO generalise the plugin registration
14 2         5 for my $name (qw(png svg jpeg audio_mpeg)) {
15 8     1   46 $iperl->helper( $name => sub { shift; $self->$name(@_) } );
  1     1   645  
  1     1   7  
16             }
17             }
18              
19 2     2 0 1117 sub png { shift; Devel::IPerl::Display::PNG->new(@_) };
  2         47  
20 0     0 0   sub svg { shift; Devel::IPerl::Display::SVG->new(@_) };
  0            
21 0     0 0   sub jpeg { shift; Devel::IPerl::Display::JPEG->new(@_) };
  0            
22 0     0 0   sub audio_mpeg { shift; Devel::IPerl::Display::AudioMPEG->new(@_) };
  0            
23              
24              
25             1;
26              
27             __END__
28              
29             =pod
30              
31             =encoding UTF-8
32              
33             =head1 NAME
34              
35             Devel::IPerl::Plugin::CoreDisplay
36              
37             =head1 VERSION
38              
39             version 0.007
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