Xform.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 37 CC 2 SCAR 11.0
CC
2
Cov
0%
apply
6.0
new
2.0
init
2.0
CRAP 3.0
1 package MARC::Xform;
2  
3 use strict;
4 use warnings;
5  
6 use vars qw($VERSION);
7  
8 $VERSION = '0.02';
9  
10 sub new {
11 my $cls = shift;
12 my $self = bless { @_ }, $cls;
13 $self->init;
14 }
15  
16 sub init { @_ }
17  
18 sub apply {
19 my ($self, $f) = @_;
20 my $fh;
21 if (ref $f) {
22 $fh = $f;
23 }
24 else {
25 open $fh, '<', $f or die "Can't open $f: $!";
26 }
27 }
28  
29 sub apply_to_record {
30 die "Abstract method";
31 }
32  
33 1;