Added YAML parser, producer, and basic test. All need more work!
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Parser / YAML.pm
1 package SQL::Translator::Parser::YAML;
2
3 # -------------------------------------------------------------------
4 # $Id: YAML.pm,v 1.1 2003-10-08 16:33:13 dlc Exp $
5 # -------------------------------------------------------------------
6 # Copyright (C) 2003 darren chamberlain <darren@cpan.org>,
7 #
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; version 2.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 # 02111-1307  USA
21 # -------------------------------------------------------------------
22
23 use strict;
24 use vars qw($VERSION);
25 $VERSION = sprintf "%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/;
26
27 use SQL::Translator::Schema;
28 use SQL::Translator::Utils qw(header_comment);
29 use YAML;
30
31 sub parse {
32     my ($translator, $data) = @_;
33     my $schema = $translator->schema;
34     my $data = Load($data);
35
36 }
37
38 1;
39
40 __END__
41
42 =head1 NAME
43
44 SQL::Translator::Parser::YAML - Parse a YAML representation of a schema
45
46 =head1 SYNOPSIS
47
48     use SQL::Translator;
49
50     my $translator = SQL::Translator->new(parser => "YAML");
51
52 =head1 DESCRIPTION
53
54 C<SQL::Translator::Parser::YAML> parses a schema serialized with YAML.
55
56 =head1 AUTHOR
57
58 Darren Chamberlain E<lt>darren@cpan.orgE<gt>