File Coverage

lib/DBIx/DR/ByteStream.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition 1 3 33.3
subroutine 5 5 100.0
pod 2 2 100.0
total 21 23 91.3


line stmt bran cond sub pod time code
1 3     3   12 use utf8;
  3         3  
  3         18  
2 3     3   70 use strict;
  3         4  
  3         43  
3 3     3   9 use warnings;
  3         4  
  3         286  
4              
5             package DBIx::DR::ByteStream;
6              
7             =head1 NAME
8              
9             DBIx::DR::ByteStream - ByteStream
10              
11             =head1 SYNOPSIS
12              
13             use DBIx::DR::ByteStream;
14              
15             my $str = DBIx::DR::ByteStream->new('abc');
16              
17             print "%s\n", $str->content;
18              
19             =head1 METHODS
20              
21             =head2 new
22              
23             Constructor.
24              
25             =head2 content
26              
27             Returns content.
28              
29             =cut
30              
31              
32             sub new {
33 322     322 1 403 my ($class, $str) = @_;
34 322   33     3489 return bless \$str => ref($class) || $class;
35             }
36              
37             sub content {
38 6     6 1 6 my ($self) = @_;
39 6         20 return $$self;
40             }
41              
42             =head1 COPYRIGHT
43              
44             Copyright (C) 2011 Dmitry E. Oboukhov
45             Copyright (C) 2011 Roman V. Nikolaev
46              
47             This program is free software, you can redistribute it and/or
48             modify it under the terms of the Artistic License.
49              
50             =cut
51              
52             1;