File Coverage

blib/lib/AnyData2/Format.pm
Criterion Covered Total %
statement 14 21 66.6
branch n/a
condition n/a
subroutine 5 10 50.0
pod 6 6 100.0
total 25 37 67.5


line stmt bran cond sub pod time code
1             package AnyData2::Format;
2              
3 4     4   61 use 5.008001;
  4         10  
  4         144  
4 4     4   14 use strict;
  4         6  
  4         108  
5 4     4   15 use warnings FATAL => 'all';
  4         3  
  4         106  
6              
7 4     4   14 use Carp 'croak';
  4         8  
  4         924  
8              
9             =head1 NAME
10              
11             AnyData2::Format - Format base class for AnyData2
12              
13             =cut
14              
15             our $VERSION = '0.001';
16              
17             =head1 METHODS
18              
19             AnyData2::Format is intended to handle the data structures for
20             AnyData2.
21              
22             =head2 new
23              
24             my $af = AnyData2::Format->new( $storage )
25              
26             constructs a format
27              
28             Derived classes shall handle their options...
29              
30             =cut
31              
32             sub new
33             {
34 3     3 1 6 my ( $class, $storage ) = @_;
35 3         11 bless { storage => $storage }, $class;
36             }
37              
38             =head2 cols
39              
40             delivers the columns
41              
42             =cut
43              
44             sub cols
45             {
46 0     0 1   croak "missing overwritten method";
47             }
48              
49             =head2 fetchrow
50              
51             fetches one row
52              
53             =cut
54              
55             sub fetchrow
56             {
57 0     0 1   croak "missing overwritten method";
58             }
59              
60             =head2 pushrow
61              
62             pushes one row
63              
64             =cut
65              
66             sub pushrow
67             {
68 0     0 1   croak "missing overwritten method";
69             }
70              
71             =head2 seek
72              
73             move storage file pointer (use with caution)
74              
75             =cut
76              
77             sub seek
78             {
79 0     0 1   my $self = shift;
80 0           $self->{storage}->seek(@_);
81             }
82              
83             =head2 truncate
84              
85             truncates storage here
86              
87             =cut
88              
89             sub truncate
90             {
91 0     0 1   my $self = shift;
92 0           $self->{storage}->truncate();
93             }
94              
95             =head1 LICENSE AND COPYRIGHT
96              
97             Copyright 2015 Jens Rehsack.
98              
99             This program is free software; you can redistribute it and/or modify it
100             under the terms of either: the GNU General Public License as published
101             by the Free Software Foundation; or the Artistic License.
102              
103             See http://dev.perl.org/licenses/ for more information.
104              
105             If your Modified Version has been derived from a Modified Version made
106             by someone other than you, you are nevertheless required to ensure that
107             your Modified Version complies with the requirements of this license.
108              
109             This license does not grant you the right to use any trademark, service
110             mark, tradename, or logo of the Copyright Holder.
111              
112             This license includes the non-exclusive, worldwide, free-of-charge
113             patent license to make, have made, use, offer to sell, sell, import and
114             otherwise transfer the Package with respect to any patent claims
115             licensable by the Copyright Holder that are necessarily infringed by the
116             Package. If you institute patent litigation (including a cross-claim or
117             counterclaim) against any party alleging that the Package constitutes
118             direct or contributory patent infringement, then this License
119             to you shall terminate on the date that such litigation is filed.
120              
121             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
122             AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
123             THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
124             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
125             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
126             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
127             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
128             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
129              
130             =cut
131              
132             1;