1DBIx::POS(3)          User Contributed Perl Documentation         DBIx::POS(3)
2
3
4

NAME

6       DBIx::POS - Define a dictionary of SQL statements in a POD dialect
7       (POS)
8

SYNOPSIS

10       To define your dictionary:
11
12         package OurSQL;
13
14         use strict;
15         use warnings;
16         use base qw{DBIx::POS};
17         __PACKAGE__->instance (__FILE__);
18
19         =name testing
20
21         =desc test the DBI::POS module
22
23         =param
24
25         Some arbitrary parameter
26
27         =sql
28
29         There is really no syntax checking done on the content of the =sql section.
30
31         =cut
32
33       To use your dictionary:
34
35         package main;
36
37         use strict;
38         use warnings;
39         use OurSQL;
40
41         my $sql = OurSQL->instance;
42
43         $dbh->do ($sql->{testing});
44

DESCRIPTION

46       DBIx-POS subclasses Pod::Parser to define a POD dialect for writing a
47       SQL dictionary for an application, and uses code from Class::Singleton
48       to make the resulting structure easily accessible.
49
50       By encouraging the centralization of SQL code, it guards against SQL
51       statement duplication (and the update problems that can generate).
52
53       By separating the SQL code from its normal context of execution, it
54       encourages you to do other things with it---for instance, it is easy to
55       create a script that can do performance testing of certain SQL
56       statements in isolation, or to create generic command-line wrapper
57       around your SQL statements.
58
59       By giving a framework for documenting the SQL, it encourages
60       documentation of the intent and/or implementation of the SQL code.  It
61       also provides all of that information in a format from which other
62       documentation could be generated---say, a chunk of DocBook for
63       incorporation into a guide to programming the application.
64
65   EXPORT
66       Nothing is exported.  Aren't singletons cool?
67

SEE ALSO

69       DBI, Pod::Parser, Class::Singleton
70

AUTHOR

72       Michael Alan Dorman, <mdorman@debian.org>
73
74       The instance routine is from Class::Singleton
75
76       Andy Wardley, "<abw@cre.canon.co.uk>"
77
78       Web Technology Group, Canon Research Centre Europe Ltd.
79
80       Thanks to Andreas Koenig "<andreas.koenig@anima.de>" for providing some
81       significant speedup patches and other ideas.
82
84       Copyright (C) 2004 by Michael Alan Dorman
85
86       This library is free software; you can redistribute it and/or modify it
87       under the same terms as Perl itself.
88
89       The instance routine is from Class::Singleton
90
91       Copyright (C) 1998 Canon Research Centre Europe Ltd.  All Rights
92       Reserved.
93
94       This module is free software; you can redistribute it and/or modify it
95       under the term of the Perl Artistic License.
96
97
98
99perl v5.32.0                      2020-07-28                      DBIx::POS(3)
Impressum