1SQL::Translator::ParserU(s3e)r Contributed Perl DocumentaStQiLo:n:Translator::Parser(3)
2
3
4

NAME

6       SQL::Translator::Parser - describes how to write a parser
7

DESCRIPTION

9       Parser modules that get invoked by SQL::Translator need to implement a
10       single function: parse.  This function will be called by the
11       SQL::Translator instance as $class::parse($tr, $data_as_string), where
12       $tr is a SQL::Translator instance.  Other than that, the classes are
13       free to define any helper functions, or use any design pattern inter‐
14       nally that make the most sense.
15
16       When the parser has determined what exists, it will communicate the
17       structure to the producer through the SQL::Translator::Schema object.
18       This object can be retrieved from the translator (the first argument
19       pass to parse) by calling the schema method:
20
21         my $schema = $tr->schema;
22
23       The Schema object has methods for adding tables, fields, indices, etc.
24       For more information, consult the docs for SQL::Translator::Schema and
25       its related modules.  For examples of how this works, examine the
26       source code for existing SQL::Translator::Parser::* modules.
27

AUTHORS

29       Ken Y. Clark, <kclark@cpan.org<gt>, darren chamberlain <dar‐
30       ren@cpan.org>.
31

SEE ALSO

33       perl(1), SQL::Translator, SQL::Translator::Schema.
34
35
36
37perl v5.8.8                       2007-10-24        SQL::Translator::Parser(3)
Impressum