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 state‐
56       ments in isolation, or to create generic command-line wrapper around
57       your SQL statements.
58
59       By giving a framework for documenting the SQL, it encourages documenta‐
60       tion of the intent and/or implementation of the SQL code.  It also pro‐
61       vides all of that information in a format from which other documenta‐
62       tion could be generated---say, a chunk of DocBook for incorporation
63       into a guide to programming the application.
64
65       EXPORT
66
67       Nothing is exported.  Aren't singletons cool?
68

SEE ALSO

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

AUTHOR

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