File Coverage

blib/lib/Devel/IPerl/Display/Role/Bytestream.pm
Criterion Covered Total %
statement 9 16 56.2
branch 0 2 0.0
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 12 25 48.0


line stmt bran cond sub pod time code
1             package Devel::IPerl::Display::Role::Bytestream;
2             $Devel::IPerl::Display::Role::Bytestream::VERSION = '0.008';
3 2     2   1014 use strict;
  2         4  
  2         51  
4 2     2   10 use warnings;
  2         4  
  2         53  
5              
6 2     2   11 use Moo::Role;
  2         4  
  2         14  
7              
8             with qw(Devel::IPerl::Display::Role::MIMEType);
9              
10             has bytestream => ( is => 'rw' );
11              
12             sub BUILDARGS {
13 0     0 0   my ( $class, @args ) = @_;
14              
15             # if first arg is data that needs to be determined
16 0 0         if( @args % 2 == 1 ) {
17 0           my $data = shift @args;
18 0           unshift @args, bytestream => $data;
19             }
20              
21 0           return { @args };
22             };
23              
24             sub iperl_data_representations {
25 0     0 0   my ($self) = @_;
26             return {
27 0           $self->mimetype => $self->bytestream,
28             };
29             }
30              
31             1;
32              
33             __END__
34              
35             =pod
36              
37             =encoding UTF-8
38              
39             =head1 NAME
40              
41             Devel::IPerl::Display::Role::Bytestream
42              
43             =head1 VERSION
44              
45             version 0.008
46              
47             =head1 AUTHOR
48              
49             Zakariyya Mughal <zmughal@cpan.org>
50              
51             =head1 COPYRIGHT AND LICENSE
52              
53             This software is copyright (c) 2014 by Zakariyya Mughal.
54              
55             This is free software; you can redistribute it and/or modify it under
56             the same terms as the Perl 5 programming language system itself.
57              
58             =cut