File Coverage

blib/lib/AnyData2/Format.pm
Criterion Covered Total %
statement 13 22 59.0
branch n/a
condition n/a
subroutine 5 11 45.4
pod 7 7 100.0
total 25 40 62.5


line stmt bran cond sub pod time code
1             package AnyData2::Format;
2              
3 4     4   50 use 5.008001;
  4         8  
4 4     4   12 use strict;
  4         4  
  4         62  
5 4     4   11 use warnings FATAL => 'all';
  4         3  
  4         98  
6              
7 4     4   9 use Carp 'croak';
  4         4  
  4         826  
8              
9             =head1 NAME
10              
11             AnyData2::Format - Format base class for AnyData2
12              
13             =cut
14              
15             our $VERSION = '0.002';
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 4 my ( $class, $storage ) = @_;
35 3         9 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             =head2 drop
96              
97             drops storage here
98              
99             =cut
100              
101             sub drop
102             {
103 0     0 1   my $self = shift;
104 0           $self->{storage}->drop();
105             }
106              
107             =head1 LICENSE AND COPYRIGHT
108              
109             Copyright 2015,2016 Jens Rehsack.
110              
111             This program is free software; you can redistribute it and/or modify it
112             under the terms of either: the GNU General Public License as published
113             by the Free Software Foundation; or the Artistic License.
114              
115             See http://dev.perl.org/licenses/ for more information.
116              
117             If your Modified Version has been derived from a Modified Version made
118             by someone other than you, you are nevertheless required to ensure that
119             your Modified Version complies with the requirements of this license.
120              
121             This license does not grant you the right to use any trademark, service
122             mark, tradename, or logo of the Copyright Holder.
123              
124             This license includes the non-exclusive, worldwide, free-of-charge
125             patent license to make, have made, use, offer to sell, sell, import and
126             otherwise transfer the Package with respect to any patent claims
127             licensable by the Copyright Holder that are necessarily infringed by the
128             Package. If you institute patent litigation (including a cross-claim or
129             counterclaim) against any party alleging that the Package constitutes
130             direct or contributory patent infringement, then this License
131             to you shall terminate on the date that such litigation is filed.
132              
133             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
134             AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
135             THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
136             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
137             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
138             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
139             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
140             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
141              
142             =cut
143              
144             1;