⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbi::dbd.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
📖 第 1 页 / 共 5 页
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings.  \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote.  \*(C+ will.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\.    ds -- \(*W-.    ds PI pi.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch.    ds L" "".    ds R" "".    ds C` "".    ds C' ""'br\}.el\{\.    ds -- \|\(em\|.    ds PI \(*p.    ds L" ``.    ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el       .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD.  Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\.    de IX.    tm Index:\\$1\t\\n%\t"\\$2"...    nr % 0.    rr F.\}.el \{\.    de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear.  Run.  Save yourself.  No user-serviceable parts..    \" fudge factors for nroff and troff.if n \{\.    ds #H 0.    ds #V .8m.    ds #F .3m.    ds #[ \f1.    ds #] \fP.\}.if t \{\.    ds #H ((1u-(\\\\n(.fu%2u))*.13m).    ds #V .6m.    ds #F 0.    ds #[ \&.    ds #] \&.\}.    \" simple accents for nroff and troff.if n \{\.    ds ' \&.    ds ` \&.    ds ^ \&.    ds , \&.    ds ~ ~.    ds /.\}.if t \{\.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u".    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}.    \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E.    \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'.    \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\.    ds : e.    ds 8 ss.    ds o a.    ds d- d\h'-1'\(ga.    ds D- D\h'-1'\(hy.    ds th \o'bp'.    ds Th \o'LP'.    ds ae ae.    ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "DBI::DBD 3".TH DBI::DBD 3 "2007-09-26" "perl v5.10.0" "User Contributed Perl Documentation".\" For nroff, turn off justification.  Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"DBI::DBD \- Perl DBI Database Driver Writer's Guide.SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 1\&  perldoc DBI::DBD.Ve.Sh "Version and volatility".IX Subsection "Version and volatility"This document is \fIstill\fR a minimal draft which is in need of further work..PPThe changes will occur both because the \fB\s-1DBI\s0\fR specification is changingand hence the requirements on \fB\s-1DBD\s0\fR drivers change, and because feedbackfrom people reading this document will suggest improvements to it..PPPlease read the \fB\s-1DBI\s0\fR documentation first and fully, including the \fB\s-1DBI\s0\fR \s-1FAQ\s0.Then reread the \fB\s-1DBI\s0\fR specification again as you're reading this. It'll help..PPThis document is a patchwork of contributions from various authors.More contributions (preferably as patches) are very welcome..SH "DESCRIPTION".IX Header "DESCRIPTION"This document is primarily intended to help people writing newdatabase drivers for the Perl Database Interface (Perl \s-1DBI\s0).It may also help others interested in discovering why the internals ofa \fB\s-1DBD\s0\fR driver are written the way they are..PPThis is a guide.  Few (if any) of the statements in it are completelyauthoritative under all possible circumstances.  This means you willneed to use judgement in applying the guidelines in this document.If in \fIany\fR doubt at all, please do contact the \fIdbi-dev\fR mailing list(details given below) where Tim Bunce and other driver authors can help..SH "CREATING A NEW DRIVER".IX Header "CREATING A NEW DRIVER"The first rule for creating a new database driver for the Perl \s-1DBI\s0 isvery simple: \fB\s-1DON\s0'T!\fR.PPThere is usually a driver already available for the database you wantto use, almost regardless of which database you choose. Very often, thedatabase will provide an \s-1ODBC\s0 driver interface, so you can often use\&\fB\s-1DBD::ODBC\s0\fR to access the database. This is typically less convenienton a Unix box than on a Microsoft Windows box, but there are numerousoptions for \s-1ODBC\s0 driver managers on Unix too, and very often the \s-1ODBC\s0driver is provided by the database supplier..PPBefore deciding that you need to write a driver, do your homework toensure that you are not wasting your energies..PP[As of December 2002, the consensus is that if you need an \s-1ODBC\s0 drivermanager on Unix, then the unixODBC driver (available from<http://www.unixodbc.org/>) is the way to go.].PPThe second rule for creating a new database driver for the Perl \s-1DBI\s0 isalso very simple: \fBDon't \*(-- get someone else to do it for you!\fR.PPNevertheless, there are occasions when it is necessary to write a newdriver, often to use a proprietary language or \s-1API\s0 to access thedatabase more swiftly, or more comprehensively, than an \s-1ODBC\s0 driver can.Then you should read this document very carefully, but with a suitablysceptical eye..PPIf there is something in here that does not make any sense, question it.You might be right that the information is bogus, but don't come to thatconclusion too quickly..Sh "URLs and mailing lists".IX Subsection "URLs and mailing lists"The primary web-site for locating \fB\s-1DBI\s0\fR software and information is.PP.Vb 1\&  http://dbi.perl.org/.Ve.PPThere are two main and one auxilliary mailing lists for people workingwith \fB\s-1DBI\s0\fR.  The primary lists are \fIdbi\-users@perl.org\fR for general usersof \fB\s-1DBI\s0\fR and \fB\s-1DBD\s0\fR drivers, and \fIdbi\-dev@perl.org\fR mainly for \fB\s-1DBD\s0\fR driverwriters (don't join the \fIdbi-dev\fR list unless you have a good reason).The auxilliary list is \fIdbi\-announce@perl.org\fR for announcing newreleases of \fB\s-1DBI\s0\fR or \fB\s-1DBD\s0\fR drivers..PPYou can join these lists by accessing the web-site <http://dbi.perl.org/>.The lists are closed so you cannot send email to any of the listsunless you join the list first..PPYou should also consider monitoring the \fIcomp.lang.perl.*\fR newsgroups,especially \fIcomp.lang.perl.modules\fR..Sh "The Cheetah book".IX Subsection "The Cheetah book"The definitive book on Perl \s-1DBI\s0 is the Cheetah book, so called becauseof the picture on the cover. Its proper title is '\fIProgramming thePerl \s-1DBI:\s0 Database programming with Perl\fR' by Alligator Descartesand Tim Bunce, published by O'Reilly Associates, February 2000, \s-1ISBN\s01\-56592\-699\-4. Buy it now if you have not already done so, and read it..Sh "Locating drivers".IX Subsection "Locating drivers"Before writing a new driver, it is in your interests to find outwhether there already is a driver for your database.  If there is sucha driver, it would be much easier to make use of it than to write yourown!.PPThe primary web-site for locating Perl software is<http://search.cpan.org/>.  You should look under the variousmodules listings for the software you are after. For example:.PP.Vb 1\&  http://search.cpan.org/modlist/Database_Interfaces.Ve.PPFollow the \fB\s-1DBD::\s0\fR and \fBDBIx::\fR links at the top to see those subsets..PPSee the \fB\s-1DBI\s0\fR docs for information on \fB\s-1DBI\s0\fR web sites and mailing lists..Sh "Registering a new driver".IX Subsection "Registering a new driver"Before going through any official registration process, you will needto establish that there is no driver already in the works. You'll dothat by asking the \fB\s-1DBI\s0\fR mailing lists whether there is such a driveravailable, or whether anybody is working on one..PPWhen you get the go ahead, you will need to establish the name of thedriver and a prefix for the driver. Typically, the name is based on thename of the database software it uses, and the prefix is a contractionof that. Hence, \fBDBD::Oracle\fR has the name \fIOracle\fR and the prefix\&'\fIora_\fR'..PPThis information will be recorded in the \fB\s-1DBI\s0\fR module. Apart fromdocumentation purposes, registration is a prerequisite forinstalling private methods..PPIf you are writing a driver which will not be distributed on \s-1CPAN\s0, thenyou should choose a prefix beginning with '\fIx_\fR', to avoid potentialprefix collisions with drivers registered in the future. Thus, if youwrote a non-CPAN distributed driver called \fBDBD::CustomDB\fR, the prefixmight be '\fIx_cdb_\fR'..PPThis document assumes you are writing a driver called \fBDBD::Driver\fR, andthat the prefix '\fIdrv_\fR' is assigned to the driver..Sh "Two styles of database driver".IX Subsection "Two styles of database driver"There are two distinct styles of database driver that can be written towork with the Perl \s-1DBI\s0..PPYour driver can be written in pure Perl, requiring no C compiler.When feasible, this is the best solution, but most databases are notwritten in such a way that this can be done. Some examples of purePerl drivers are \fBDBD::File\fR and \fB\s-1DBD::CSV\s0\fR..PPAlternatively, and most commonly, your driver will need to use some Ccode to gain access to the database. This will be classified as a C/XSdriver..Sh "What code will you write?".IX Subsection "What code will you write?"There are a number of files that need to be written for either a purePerl driver or a C/XS driver. There are no extra files needed only bya pure Perl driver, but there are several extra files needed only by aC/XS driver..PP\fIFiles common to pure Perl and C/XS drivers\fR.IX Subsection "Files common to pure Perl and C/XS drivers".PPAssuming that your driver is called \fBDBD::Driver\fR, these files are:.IP "\(bu" 4\&\fIMakefile.PL\fR.IP "\(bu" 4\&\fI\s-1README\s0\fR.IP "\(bu" 4\&\fI\s-1MANIFEST\s0\fR.IP "\(bu" 4\&\fIDriver.pm\fR.IP "\(bu" 4\&\fIlib/Bundle/DBD/Driver.pm\fR.IP "\(bu" 4\&\fIlib/DBD/Driver/Summary.pm\fR.IP "\(bu" 4\&\fIt/*.t\fR.PPThe first four files are mandatory. \fIMakefile.PL\fR is used to controlhow the driver is built and installed. The \fI\s-1README\s0\fR file tells peoplewho download the file about how to build the module and any prerequisitesoftware that must be installed. The \fI\s-1MANIFEST\s0\fR file is used by thestandard Perl module distribution mechanism. It lists all the sourcefiles that need to be distributed with your module. \fIDriver.pm\fR is whatis loaded by the \fB\s-1DBI\s0\fR code; it contains the methods peculiar to yourdriver..PPThe \fIlib/Bundle/DBD/Driver.pm\fR file allows you to specify other Perlmodules on which yours depends in a format that allows someone to type asimple command and ensure that all the pre-requisites are in place aswell as building your driver..PPThe \fIlib/DBD/Driver/Summary.pm\fR file contains (an updated version of) theinformation that was included \- or that would have been included \- inthe appendices of the Cheetah book as a summary of the abilities of your

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -