82b0dd281a8fe78a7df6704aee4f6b357c1c285a
[migration-tools.git] / Equinox-Migration / lib / Equinox / Migration / MapDrivenXMLProc.pm
1 package Equinox::Migration::MapDrivenXMLProc;
2
3 use warnings;
4 use strict;
5
6 use XML::Twig;
7 use Equinox::Migration::SubfieldMapper;
8
9 =head1 NAME
10
11 Equinox::Migration::MapDrivenXMLProc
12
13 =head1 VERSION
14
15 Version 1.000
16
17 =cut
18
19 our $VERSION = '1.000';
20
21
22 =head1 SYNOPSIS
23
24 Foo
25
26     use Equinox::Migration::MapDrivenXMLProc;
27
28
29 =head1 METHODS
30
31
32 =head2 new
33
34 =cut
35
36 sub new {
37     my ($class, %args) = @_;
38
39     my $self = bless { conf => { except => 0,
40                                  range  => { high => 0, low => 0 },
41                                  lastwasrange => 0,
42                                },
43                        tags => {} }, $class;
44
45     if ($args{file}) {
46         if (-r $args{file}) {
47             $self->{conf}{file} = $args{file};
48             $self->generate;
49         } else {
50             die "Can't open tags file: $!\n";
51         }
52     }
53
54     return $self;
55 }
56
57 =head1 AUTHOR
58
59 Shawn Boyette, C<< <sboyette at esilibrary.com> >>
60
61 =head1 BUGS
62
63 Please report any bugs or feature requests to the above email address.
64
65 =head1 SUPPORT
66
67 You can find documentation for this module with the perldoc command.
68
69     perldoc Equinox::Migration::MapDrivenXMLProc
70
71
72 =head1 COPYRIGHT & LICENSE
73
74 Copyright 2009 Equinox, all rights reserved.
75
76 This program is free software; you can redistribute it and/or modify it
77 under the same terms as Perl itself.
78
79
80 =cut
81
82 1; # End of Equinox::Migration::MapDrivenXMLProc