1SQL::Dialects::Role(3)User Contributed Perl DocumentationSQL::Dialects::Role(3)
2
3
4

NAME

6       SQL::Dialects::Role - The role of being a SQL::Dialect
7

SYNOPSIS

9           package My::SQL::Dialect;
10
11           use SQL::Dialects::Role;
12
13           sub get_config {
14               return <<CONFIG;
15           [SECTION]
16           item1
17           item2
18
19           [ANOTHER SECTION]
20           item1
21           item2
22           CONFIG
23           }
24

DESCRIPTION

26       This adds the role of being a SQL::Dialect to your class.
27
28   Requirements
29       You must implement...
30
31       get_config
32
33           my $config = $class->get_config;
34
35       Returns information about the dialect in an INI-like format.
36
37   Implements
38       The role implements...
39
40       get_config_as_hash
41
42           my $config = $class->get_config_as_hash;
43
44       Returns the data represented in get_config() as a hash ref.
45
46       Items will be upper-cased, sections will be lower-cased.
47
48       The example in the SYNOPSIS would come back as...
49
50           {
51               section => {
52                   ITEM1       => 1,
53                   ITEM2       => 2,
54               },
55               another_section => {
56                   ITEM1       => 1,
57                   ITEM2       => 2,
58               }
59          }
60

SEE ALSO

62       "dialect()" in SQL::Parser
63
64
65
66perl v5.12.1                      2010-08-11            SQL::Dialects::Role(3)
Impressum