├── .aspell.local.pws ├── .gdbinit ├── .github └── workflows │ └── test.yml ├── .gitignore ├── .releaserc ├── ChangeLog ├── DBI.pm ├── DBI.xs ├── DBIXS.h ├── Driver.xst ├── Driver_xst.h ├── INSTALL ├── LICENSE ├── MANIFEST ├── MANIFEST.SKIP ├── Makefile.PL ├── Old ├── RCS_of_DBI-1.41-rc1-pre-svn.tar.gz ├── Roadmap.pod ├── TASKS.pod ├── TODO_2005.txt └── TODO_gofer.txt ├── Perl.xs ├── README.md ├── appveyor.yml ├── changes2pm.pl ├── cpanfile ├── dbd_xsh.h ├── dbi.tiddlyspot.com.html ├── dbi_sql.h ├── dbilogstrip.PL ├── dbipport.h ├── dbiprof.PL ├── dbiproxy.PL ├── dbivport.h ├── dbixs_rev.h ├── dbixs_rev.pl ├── devel ├── .perltidyrc-timbunce ├── .perltidyrc-tux ├── README ├── finish-discard_pending_rows.patch └── genPPPort_h.pl ├── doc ├── Bundle-DBI.3 ├── Bundle-DBI.html ├── Bundle-DBI.man ├── Bundle-DBI.md ├── DBD-DBM.3 ├── DBD-DBM.html ├── DBD-DBM.man ├── DBD-DBM.md ├── DBD-ExampleP.html ├── DBD-File.3 ├── DBD-File.html ├── DBD-File.man ├── DBD-File.md ├── DBD-Gofer-Policy-Base.3 ├── DBD-Gofer-Policy-Base.html ├── DBD-Gofer-Policy-Base.man ├── DBD-Gofer-Policy-Base.md ├── DBD-Gofer-Policy-classic.3 ├── DBD-Gofer-Policy-classic.html ├── DBD-Gofer-Policy-classic.man ├── DBD-Gofer-Policy-classic.md ├── DBD-Gofer-Policy-pedantic.3 ├── DBD-Gofer-Policy-pedantic.html ├── DBD-Gofer-Policy-pedantic.man ├── DBD-Gofer-Policy-pedantic.md ├── DBD-Gofer-Policy-rush.3 ├── DBD-Gofer-Policy-rush.html ├── DBD-Gofer-Policy-rush.man ├── DBD-Gofer-Policy-rush.md ├── DBD-Gofer-Transport-Base.3 ├── DBD-Gofer-Transport-Base.html ├── DBD-Gofer-Transport-Base.man ├── DBD-Gofer-Transport-Base.md ├── DBD-Gofer-Transport-corostream.3 ├── DBD-Gofer-Transport-corostream.html ├── DBD-Gofer-Transport-corostream.man ├── DBD-Gofer-Transport-corostream.md ├── DBD-Gofer-Transport-null.3 ├── DBD-Gofer-Transport-null.html ├── DBD-Gofer-Transport-null.man ├── DBD-Gofer-Transport-null.md ├── DBD-Gofer-Transport-pipeone.3 ├── DBD-Gofer-Transport-pipeone.html ├── DBD-Gofer-Transport-pipeone.man ├── DBD-Gofer-Transport-pipeone.md ├── DBD-Gofer-Transport-stream.3 ├── DBD-Gofer-Transport-stream.html ├── DBD-Gofer-Transport-stream.man ├── DBD-Gofer-Transport-stream.md ├── DBD-Gofer.3 ├── DBD-Gofer.html ├── DBD-Gofer.man ├── DBD-Gofer.md ├── DBD-Mem.3 ├── DBD-Mem.html ├── DBD-Mem.man ├── DBD-Mem.md ├── DBD-Multiplex-Logic-Default.html ├── DBD-Multiplex.3 ├── DBD-Multiplex.html ├── DBD-Multiplex.man ├── DBD-Multiplex.md ├── DBD-NullP.html ├── DBD-Proxy.3 ├── DBD-Proxy.html ├── DBD-Proxy.man ├── DBD-Proxy.md ├── DBD-Sponge.3 ├── DBD-Sponge.html ├── DBD-Sponge.man ├── DBD-Sponge.md ├── Win32-DBIODBC.3 ├── Win32-DBIODBC.html ├── Win32-DBIODBC.man ├── Win32-DBIODBC.md └── make-doc.pl ├── err_new ├── err_leaktracking.msg ├── err_metayml.mgs ├── err_modglobalclone.msg ├── err_mxauth.msg ├── err_oldconnect.patch ├── err_plserverbug.msg ├── err_profilewin32hires.msg ├── err_proxyrpc.msg └── err_signal-docs.msg ├── err_shelved ├── err_add-defaults-last-insid.msg ├── err_breaks.msg ├── err_dbtype.msg ├── err_leakdetection.msg ├── err_multidrivercore.msg ├── err_paramtypeattr.msg ├── err_poddocs.msg ├── err_priv_attr_subclass.msg ├── err_provide_sth_reset.msg ├── err_proxybindnamed.msg ├── err_proxytest.msg ├── err_setmagic_rowfetch.msg ├── err_state.msg ├── err_successwithinfo.msg ├── err_svpv.msg ├── err_utf8trsnacodexs.msg ├── err_warnhandler.msg ├── ref_croakxs.msg ├── ref_gotoxs.msg ├── ref_in_eval.msg ├── ref_magicsv.txt └── ref_tie_xs.info ├── ex ├── corogofer.pl ├── perl_dbi_nulls_test.pl ├── profile.pl └── unicode_test.pl ├── lib ├── Bundle │ └── DBI.pm ├── DBD │ ├── DBM.pm │ ├── ExampleP.pm │ ├── File.pm │ ├── File │ │ ├── Developers.pod │ │ ├── HowTo.pod │ │ └── Roadmap.pod │ ├── Gofer.pm │ ├── Gofer │ │ ├── Policy │ │ │ ├── Base.pm │ │ │ ├── classic.pm │ │ │ ├── pedantic.pm │ │ │ └── rush.pm │ │ └── Transport │ │ │ ├── Base.pm │ │ │ ├── corostream.pm │ │ │ ├── null.pm │ │ │ ├── pipeone.pm │ │ │ └── stream.pm │ ├── Mem.pm │ ├── Multiplex.pm │ ├── Multiplex │ │ └── Logic │ │ │ └── Default.pm │ ├── NullP.pm │ ├── Proxy.pm │ └── Sponge.pm ├── DBI │ ├── Changes.pm │ ├── Const │ │ ├── GetInfo │ │ │ ├── ANSI.pm │ │ │ └── ODBC.pm │ │ ├── GetInfoReturn.pm │ │ └── GetInfoType.pm │ ├── DBD.pm │ ├── DBD │ │ ├── Metadata.pm │ │ ├── SqlEngine.pm │ │ └── SqlEngine │ │ │ ├── Developers.pod │ │ │ └── HowTo.pod │ ├── Gofer │ │ ├── Execute.pm │ │ ├── Request.pm │ │ ├── Response.pm │ │ ├── Serializer │ │ │ ├── Base.pm │ │ │ ├── DataDumper.pm │ │ │ └── Storable.pm │ │ └── Transport │ │ │ ├── Base.pm │ │ │ ├── pipeone.pm │ │ │ └── stream.pm │ ├── Profile.pm │ ├── ProfileData.pm │ ├── ProfileDumper.pm │ ├── ProfileDumper │ │ └── Apache.pm │ ├── ProfileSubs.pm │ ├── ProxyServer.pm │ ├── PurePerl.pm │ ├── SQL │ │ └── Nano.pm │ ├── Util │ │ ├── CacheMemory.pm │ │ └── _accessor.pm │ └── W32ODBC.pm └── Win32 │ └── DBIODBC.pm ├── sandbox ├── dumpmethods.pl └── goferperf.pl ├── t-mock ├── DBI │ ├── Test │ │ ├── Case │ │ │ └── DBI │ │ │ │ ├── attributes │ │ │ │ ├── Active.pm │ │ │ │ ├── ActiveKids.pm │ │ │ │ ├── CachedKids.pm │ │ │ │ ├── Executed.pm │ │ │ │ ├── Kids.pm │ │ │ │ └── Type.pm │ │ │ │ └── simple │ │ │ │ ├── dbm.pm │ │ │ │ ├── file.pm │ │ │ │ └── sql_engine.pm │ │ └── DBI │ │ │ ├── Case.pm │ │ │ ├── Conf.pm │ │ │ ├── DSN │ │ │ └── Provider │ │ │ │ └── DBM.pm │ │ │ └── List.pm │ └── simple │ │ ├── dvd_dbm.t │ │ ├── dvd_file.t │ │ ├── dvds_dbm.t │ │ ├── dvdsd_dbm.t │ │ ├── dvdsf_dbm.t │ │ ├── dvdss_dbm.t │ │ ├── dvf_file.t │ │ ├── sql_engine.t │ │ ├── zvg_dvd_dbm.t │ │ ├── zvg_dvd_file.t │ │ ├── zvg_dvds_dbm.t │ │ ├── zvg_dvdsd_dbm.t │ │ ├── zvg_dvdsf_dbm.t │ │ ├── zvg_dvdss_dbm.t │ │ ├── zvg_dvf_file.t │ │ ├── zvg_sql_engine.t │ │ ├── zvgn_dvd_dbm.t │ │ ├── zvgn_dvd_file.t │ │ ├── zvgn_dvds_dbm.t │ │ ├── zvgn_dvdsd_dbm.t │ │ ├── zvgn_dvdsf_dbm.t │ │ ├── zvgn_dvdss_dbm.t │ │ ├── zvgn_dvf_file.t │ │ ├── zvgn_sql_engine.t │ │ ├── zvn_dvd_dbm.t │ │ ├── zvn_dvd_file.t │ │ ├── zvn_dvds_dbm.t │ │ ├── zvn_dvdsd_dbm.t │ │ ├── zvn_dvdsf_dbm.t │ │ ├── zvn_dvdss_dbm.t │ │ ├── zvn_dvf_file.t │ │ ├── zvn_sql_engine.t │ │ ├── zvp_dvd_dbm.t │ │ ├── zvp_dvd_file.t │ │ ├── zvp_dvds_dbm.t │ │ ├── zvp_dvdsd_dbm.t │ │ ├── zvp_dvdsf_dbm.t │ │ ├── zvp_dvdss_dbm.t │ │ ├── zvp_dvf_file.t │ │ ├── zvp_sql_engine.t │ │ ├── zvpg_dvd_dbm.t │ │ ├── zvpg_dvd_file.t │ │ ├── zvpg_dvds_dbm.t │ │ ├── zvpg_dvdsd_dbm.t │ │ ├── zvpg_dvdsf_dbm.t │ │ ├── zvpg_dvdss_dbm.t │ │ ├── zvpg_dvf_file.t │ │ ├── zvpg_sql_engine.t │ │ ├── zvpgn_dvd_dbm.t │ │ ├── zvpgn_dvd_file.t │ │ ├── zvpgn_dvds_dbm.t │ │ ├── zvpgn_dvdsd_dbm.t │ │ ├── zvpgn_dvdsf_dbm.t │ │ ├── zvpgn_dvdss_dbm.t │ │ ├── zvpgn_dvf_file.t │ │ ├── zvpgn_sql_engine.t │ │ ├── zvpn_dvd_dbm.t │ │ ├── zvpn_dvd_file.t │ │ ├── zvpn_dvds_dbm.t │ │ ├── zvpn_dvdsd_dbm.t │ │ ├── zvpn_dvdsf_dbm.t │ │ ├── zvpn_dvdss_dbm.t │ │ ├── zvpn_dvf_file.t │ │ └── zvpn_sql_engine.t ├── SQL │ └── Statement │ │ ├── dvc_error.t │ │ ├── dvd_error.t │ │ ├── dvf_error.t │ │ ├── mvb_dvn_error.t │ │ ├── zvp_dvc_error.t │ │ ├── zvp_dvd_error.t │ │ ├── zvp_dvf_error.t │ │ ├── zvp_mvb_dvc_error.t │ │ ├── zvp_mvb_dvd_error.t │ │ ├── zvp_mvb_dvf_error.t │ │ └── zvp_mvb_dvn_error.t └── basic │ ├── dvd_connect.t │ ├── dvd_disconnect.t │ ├── dve_connect.t │ ├── dve_disconnect.t │ ├── dvf_connect.t │ ├── dvf_disconnect.t │ ├── dvn_connect.t │ ├── dvn_disconnect.t │ ├── mvb_dvn_connect.t │ ├── mvb_dvn_disconnect.t │ ├── zvg_dvd_connect.t │ ├── zvg_dvd_disconnect.t │ ├── zvg_dve_connect.t │ ├── zvg_dve_disconnect.t │ ├── zvg_dvf_connect.t │ ├── zvg_dvf_disconnect.t │ ├── zvg_dvn_connect.t │ ├── zvg_dvn_disconnect.t │ ├── zvg_mvb_dvn_connect.t │ ├── zvg_mvb_dvn_disconnect.t │ ├── zvgn_dvd_connect.t │ ├── zvgn_dvd_disconnect.t │ ├── zvgn_dve_connect.t │ ├── zvgn_dve_disconnect.t │ ├── zvgn_dvf_connect.t │ ├── zvgn_dvf_disconnect.t │ ├── zvgn_dvn_connect.t │ ├── zvgn_dvn_disconnect.t │ ├── zvgn_mvb_dvn_connect.t │ ├── zvgn_mvb_dvn_disconnect.t │ ├── zvn_dvd_connect.t │ ├── zvn_dvd_disconnect.t │ ├── zvn_dve_connect.t │ ├── zvn_dve_disconnect.t │ ├── zvn_dvf_connect.t │ ├── zvn_dvf_disconnect.t │ ├── zvn_dvn_connect.t │ ├── zvn_dvn_disconnect.t │ ├── zvn_mvb_dvn_connect.t │ ├── zvn_mvb_dvn_disconnect.t │ ├── zvp_dvd_connect.t │ ├── zvp_dvd_disconnect.t │ ├── zvp_dve_connect.t │ ├── zvp_dve_disconnect.t │ ├── zvp_dvf_connect.t │ ├── zvp_dvf_disconnect.t │ ├── zvp_dvn_connect.t │ ├── zvp_dvn_disconnect.t │ ├── zvp_mvb_dvn_connect.t │ ├── zvp_mvb_dvn_disconnect.t │ ├── zvpg_dvd_connect.t │ ├── zvpg_dvd_disconnect.t │ ├── zvpg_dve_connect.t │ ├── zvpg_dve_disconnect.t │ ├── zvpg_dvf_connect.t │ ├── zvpg_dvf_disconnect.t │ ├── zvpg_dvn_connect.t │ ├── zvpg_dvn_disconnect.t │ ├── zvpg_mvb_dvn_connect.t │ ├── zvpg_mvb_dvn_disconnect.t │ ├── zvpgn_dvd_connect.t │ ├── zvpgn_dvd_disconnect.t │ ├── zvpgn_dve_connect.t │ ├── zvpgn_dve_disconnect.t │ ├── zvpgn_dvf_connect.t │ ├── zvpgn_dvf_disconnect.t │ ├── zvpgn_dvn_connect.t │ ├── zvpgn_dvn_disconnect.t │ ├── zvpgn_mvb_dvn_connect.t │ ├── zvpgn_mvb_dvn_disconnect.t │ ├── zvpn_dvd_connect.t │ ├── zvpn_dvd_disconnect.t │ ├── zvpn_dve_connect.t │ ├── zvpn_dve_disconnect.t │ ├── zvpn_dvf_connect.t │ ├── zvpn_dvf_disconnect.t │ ├── zvpn_dvn_connect.t │ ├── zvpn_dvn_disconnect.t │ ├── zvpn_mvb_dvn_connect.t │ └── zvpn_mvb_dvn_disconnect.t ├── t ├── 01basics.t ├── 02dbidrv.t ├── 03handle.t ├── 04mods.t ├── 05concathash.t ├── 06attrs.t ├── 07kids.t ├── 08keeperr.t ├── 09trace.t ├── 10examp.t ├── 11fetch.t ├── 12quote.t ├── 13taint.t ├── 14utf8.t ├── 15array.t ├── 16destroy.t ├── 17handle_error.t ├── 19fhtrace.t ├── 20meta.t ├── 30subclass.t ├── 31methcache.t ├── 35thrclone.t ├── 40profile.t ├── 41prof_dump.t ├── 42prof_data.t ├── 43prof_env.t ├── 48dbi_dbd_sqlengine.t ├── 49dbd_file.t ├── 50dbm_simple.t ├── 51dbm_file.t ├── 52dbm_complex.t ├── 53sqlengine_adv.t ├── 54_dbd_mem.t ├── 60preparse.t ├── 65transact.t ├── 70callbacks.t ├── 72childhandles.t ├── 73cachedkids.t ├── 80proxy.t ├── 85gofer.t ├── 86gofer_fail.t ├── 87gofer_cache.t ├── 90sql_type_cast.t ├── 91_store_warning.t └── lib.pl ├── typemap └── xt ├── 00_perlversion.t ├── 00_pod.t ├── 01_pod.t ├── 02_pod-spell.t ├── 10_perm.t ├── 20_kwalitee.t ├── 30_links.t ├── 40_filenames.t ├── 50_manifest.t ├── 60_changelog.t ├── 70_cve.t ├── README ├── dbixha-goperf.pl ├── goferdemo.pl ├── leak.pl └── tests.pl /.gdbinit: -------------------------------------------------------------------------------- 1 | # http://sourceware.org/gdb/current/onlinedocs/gdb/ 2 | 3 | set breakpoint pending on 4 | b __asan_report_error 5 | set args -Mblib t/50dbm_simple.t 6 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | push: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | build: 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | os: [ ubuntu-latest ] 17 | 18 | perl: [ 19 | '5.8', 20 | '5.10', '5.12', '5.14', '5.16', '5.18', 21 | '5.20', '5.22', '5.24', '5.26', '5.28', 22 | '5.30', '5.32', '5.34', '5.36', '5.38', 23 | '5.40', 24 | ] 25 | 26 | threads: [ false, true ] 27 | 28 | runs-on: ${{ matrix.os }} 29 | 30 | name: ${{ matrix.perl }}${{ matrix.threads && '-threads' || '' }} 31 | 32 | steps: 33 | - uses: actions/checkout@v4 34 | 35 | - uses: shogo82148/actions-setup-perl@v1 36 | with: 37 | multi-thread: ${{ matrix.threads }} 38 | perl-version: ${{ matrix.perl }} 39 | 40 | - run: perl -V 41 | 42 | - run: cpanm --installdeps --notest --skip-satisfied . 43 | 44 | - run: perl Makefile.PL 45 | 46 | - run: make test 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.bs 2 | *.c 3 | *.gcda 4 | *.gcno 5 | *.gcov 6 | *.log 7 | *.o 8 | *.old 9 | *.prev 10 | *.prt 11 | *.tar.gz 12 | *.tbz 13 | *.tgz 14 | *~ 15 | .*.swp 16 | DBI-* 17 | DBI.def 18 | Fabian 19 | META.yml 20 | Makefile 21 | ModList 22 | MYMETA.* 23 | Perl.xsi 24 | blib 25 | cover_db 26 | dbi.eml 27 | dbilogstrip 28 | dbiprof 29 | dbiproxy 30 | dll.base 31 | dll.exp 32 | git-dpull 33 | git-svn-modlist 34 | _Inline/ 35 | nytprof* 36 | pm_to_blib 37 | pod2htm* 38 | sandbox/ 39 | t/zv[gpxn]* 40 | used-by-t/ 41 | tmp/ 42 | valgrind.log 43 | test_output_*/ 44 | doc/*.pod 45 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | cpan_user HMBRAND 2 | automated_testing 1 3 | skip_kwalitee 1 4 | skip_manifest 1 5 | skip_prereqs 1 6 | skip_changes 1 7 | skip_dist 1 8 | ignore_untracked 1 9 | allow_glob_in_perls 1 10 | perls /pro/bin/perl\ 11 | :/usr/local/bin/perl\ 12 | :/usr/bin/perl\ 13 | :/media/Tux/perls/bin/perl5.8.[123456789] \ 14 | :/media/Tux/perls/bin/perl5.[1234][02468].*\ 15 | :/media/Tux/perls/bin/perl5.41.*\ 16 | :/media/Tux/perls/bin/tperl5.8.[123456789] \ 17 | :/media/Tux/perls/bin/tperl5.[1234][02468].*\ 18 | :/media/Tux/perls/bin/tperl5.41.* 19 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | BEFORE BUILDING, TESTING AND INSTALLING this you will need to: 2 | 3 | Build, test and install a recent version of Perl 5 4 | It is very important to test it and actually install it! 5 | (You can use "Configure -Dprefix=..." to build a private copy.) 6 | 7 | BUILDING 8 | 9 | perl Makefile.PL 10 | make 11 | make test 12 | make test TEST_VERBOSE=1 (if any of the t/* tests fail) 13 | make install (if the tests look okay) 14 | 15 | The perl you use to execute Makefile.PL should be the first one in your PATH. 16 | If you want to use some installed perl then modify your PATH to match. 17 | 18 | IF YOU HAVE PROBLEMS 19 | 20 | --- 21 | If you get an error like "gcc: command not found" or "cc: command not found" 22 | you need to either install a compiler, or you may be able to install a 23 | precompiled binary of DBI using a package manager (e.g., ppm for ActiveState, 24 | Synaptic for Ubuntu, port for FreeBSD etc) 25 | 26 | --- 27 | If you get compiler errors referring to Perl's own header files 28 | (.../CORE/...h) or the compiler complains about bad options etc then 29 | there is something wrong with your perl installation. If the compiler complains 30 | of missing files (.../perl.h: error: sys/types.h: No such file) then you may 31 | need to install extra packages for your operating system. 32 | 33 | Generally it's best to use a Perl that was built on the system you are trying 34 | to use and it's also important to use the same compiler that was used to build 35 | the Perl you are using. 36 | 37 | If you installed Perl using a binary distribution, such as ActiveState Perl, 38 | or if Perl came installed with the operating system you use, such as Debian or 39 | Ubuntu, then you may be able to install a precompiled binary of DBI using a 40 | package manager. Check the package manager for your distribution of Perl (e.g. 41 | ppm for ActiveState) or for your operating system (e.g Synaptic for Ubuntu). 42 | 43 | --- 44 | If you get compiler warnings like "value computed is not used" and 45 | "unused variable" you can ignore them. 46 | 47 | -------------------------------------------------------------------------------- /MANIFEST.SKIP: -------------------------------------------------------------------------------- 1 | ^MANIFEST\. 2 | ^Makefile$ 3 | ^MYMETA 4 | ~$ 5 | ^\.appveyor\.yml 6 | ^\.aspell\.local\.pws$ 7 | ^\.DS_Store 8 | ^\.gdbinit 9 | ^\.git 10 | ^\.github 11 | ^\.releaserc 12 | ^\.test_info\. 13 | ^_Inline/ 14 | \.bs$ 15 | \.html$ 16 | \.log$ 17 | \.old$ 18 | \.prev$ 19 | \.prt$ 20 | \.tmp$ 21 | \.xsi$ 22 | \.[co]$ 23 | ^appveyor\.yml 24 | ^blib/ 25 | ^changes2pm\.pl 26 | ^DBI-\d 27 | ^dbi.tiddlyspot.com.html 28 | ^dbilogstrip$ 29 | ^dbiprof$ 30 | ^dbiproxy$ 31 | ^devel/ 32 | ^doc/ 33 | ^err/ 34 | ^err_ 35 | ^lib/DBD/Multiplex\.pm 36 | ^lib/DBD/Multiplex/Logic/Default\.pm 37 | ^make-doc\.pl 38 | ^Old/ 39 | ^pm_to_blib 40 | ^ppport.h$ 41 | ^sandbox/ 42 | ^t-mock/ 43 | ^t/z 44 | ^test_output_ 45 | ^used-by-t/ 46 | ^used_by/ 47 | ^xt/ 48 | -------------------------------------------------------------------------------- /Old/RCS_of_DBI-1.41-rc1-pre-svn.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perl5-dbi/dbi/b9cc7cca3d71b0ce5dfcb86d79c81764e0b24176/Old/RCS_of_DBI-1.41-rc1-pre-svn.tar.gz -------------------------------------------------------------------------------- /Old/TASKS.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | TASKS - Want to help? These things need doing... 4 | 5 | =head2 Increase test coverage 6 | 7 | More tests need to be added to test the codes that not urrently being tested. 8 | 9 | It's pretty poor right now: 10 | 11 | http://pjcj.sytes.net/cover/latest/DBI-1.52/coverage.html 12 | 13 | Start with improving the subroutine coverage 14 | 15 | http://pjcj.sytes.net/cover/latest/DBI-1.52/blib-lib-DBI-pm--subroutine.html 16 | 17 | =head2 Test the proxy 18 | 19 | The current t/80proxy.t is isolated from the rest of the test suite so actually 20 | tests very little, and what it does test is duplicating other tests. 21 | 22 | Ideally the proxy should be tested in the same way as DBI::PurePerl. In other 23 | words, by creating wrappers test files for each test file that set 24 | $ENV{DBI_AUTOPROXY} and run the original test. They'll also need to start and 25 | stop a proxy server. 26 | 27 | =head2 Fixing bugs 28 | 29 | The official bug list is here: 30 | 31 | http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBI 32 | 33 | Naturally I'll offer direction and guidance on any you want to tackle. 34 | I've also got a few that could be entered into rt.cpan.org. 35 | 36 | =head2 Others 37 | 38 | General: 39 | 40 | Protect trace_msg from SIGPIPE? 41 | prepare(...,{ Err=>\my $isolated_err, ...}) 42 | Add trace module that just records the last N trace messages into an array 43 | and prepends them to any error message to provide context for the error. 44 | Document DBI_PROFILE_FLOCK and LockFile attrib in DBI::ProfileData and DBI::ProfileDumper 45 | 46 | Performance: 47 | 48 | Move _new_sth to DBI::db::_new_sth (leave alias) and implement in C 49 | Or call _new_child and move to DBI::common? 50 | 51 | Implement FETCH_many() in C 52 | 53 | Add high-res dbi_time for windows - via Time::HiRes glob replace dbi_time()? 54 | 55 | =cut 56 | -------------------------------------------------------------------------------- /Perl.xs: -------------------------------------------------------------------------------- 1 | /* This is a skeleton driver that only serves as a basic sanity check 2 | that the Driver.xst mechansim doesn't have compile-time errors in it. 3 | vim: ts=8:sw=4:expandtab 4 | */ 5 | 6 | #define PERL_NO_GET_CONTEXT 7 | #include "DBIXS.h" 8 | #include "dbd_xsh.h" 9 | 10 | #undef DBIh_SET_ERR_CHAR /* to syntax check emulation */ 11 | #include "dbivport.h" 12 | 13 | DBISTATE_DECLARE; 14 | 15 | 16 | struct imp_drh_st { 17 | dbih_drc_t com; /* MUST be first element in structure */ 18 | }; 19 | struct imp_dbh_st { 20 | dbih_dbc_t com; /* MUST be first element in structure */ 21 | }; 22 | struct imp_sth_st { 23 | dbih_stc_t com; /* MUST be first element in structure */ 24 | }; 25 | 26 | 27 | 28 | #define dbd_discon_all(drh, imp_drh) (drh=drh,imp_drh=imp_drh,1) 29 | #define dbd_dr_data_sources(drh, imp_drh, attr) (drh=drh,imp_drh=imp_drh,attr=attr,Nullav) 30 | #define dbd_db_do4_iv(dbh,imp_dbh,p3,p4) (dbh=dbh,imp_dbh=imp_dbh,(void*)p3,p4=p4,-2) 31 | #define dbd_db_last_insert_id(dbh, imp_dbh, p3,p4,p5,p6, attr) \ 32 | (dbh=dbh,imp_dbh=imp_dbh,p3=p3,p4=p4,p5=p5,p6=p6,attr=attr,&PL_sv_undef) 33 | #define dbd_take_imp_data(h, imp_xxh, p3) (h=h,imp_xxh=imp_xxh,&PL_sv_undef) 34 | #define dbd_st_execute_for_fetch(sth, imp_sth, p3, p4) \ 35 | (sth=sth,imp_sth=imp_sth,p3=p3,p4=p4,&PL_sv_undef) 36 | 37 | #define dbd_st_bind_col(sth, imp_sth, param, ref, sql_type, attribs) \ 38 | (sth=sth,imp_sth=imp_sth,param=param,ref=ref,sql_type=sql_type,attribs=attribs,1) 39 | 40 | int /* just to test syntax of macros etc */ 41 | dbd_st_rows(SV *h, imp_sth_t *imp_sth) 42 | { 43 | dTHX; 44 | PERL_UNUSED_VAR(h); 45 | DBIh_SET_ERR_CHAR(h, imp_sth, 0, 1, "err msg", "12345", Nullch); 46 | return -1; 47 | } 48 | 49 | 50 | MODULE = DBD::Perl PACKAGE = DBD::Perl 51 | 52 | INCLUDE: Perl.xsi 53 | 54 | # vim:sw=4:ts=8 55 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | 3 | install: 4 | - cinst StrawberryPerl 5 | - path C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH% 6 | - mkdir %APPVEYOR_BUILD_FOLDER%\tmp 7 | - set TMPDIR=%APPVEYOR_BUILD_FOLDER%\tmp 8 | - perl -V 9 | - cpan App::cpanminus 10 | - cpanm -q --showdeps --with-develop --with-suggests . | findstr /v "^perl\>" | cpanm -n 11 | - 'echo End install at: & time /t' 12 | 13 | build_script: 14 | - perl Makefile.PL 15 | 16 | test_script: 17 | - dmake test 18 | -------------------------------------------------------------------------------- /cpanfile: -------------------------------------------------------------------------------- 1 | requires "XSLoader"; 2 | 3 | recommends "Encode" => "3.21"; 4 | 5 | suggests "Clone" => "0.47"; 6 | suggests "DB_File"; 7 | suggests "MLDBM"; 8 | suggests "Net::Daemon"; 9 | suggests "RPC::PlServer" => "0.2020"; 10 | suggests "SQL::Statement" => "1.414"; 11 | 12 | on "configure" => sub { 13 | requires "ExtUtils::MakeMaker" => "6.48"; 14 | 15 | recommends "ExtUtils::MakeMaker" => "7.70"; 16 | }; 17 | 18 | on "test" => sub { 19 | requires "Test::More" => "0.90"; 20 | 21 | recommends "Test::More" => "1.302207"; 22 | }; 23 | -------------------------------------------------------------------------------- /dbilogstrip.PL: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # -*- perl -*- 3 | my $file = $ARGV[0] || 'dbilogstrip'; 4 | 5 | my $script = <<'SCRIPT'; 6 | ~startperl~ 7 | 8 | =head1 NAME 9 | 10 | dbilogstrip - filter to normalize DBI trace logs for diff'ing 11 | 12 | =head1 SYNOPSIS 13 | 14 | Read DBI trace file C and write out a stripped version to C 15 | 16 | dbilogstrip dbitrace.log > dbitrace_stripped.log 17 | 18 | Run C twice, each with different sets of arguments, with 19 | DBI_TRACE enabled. Filter the output and trace through C into a 20 | separate file for each run. Then compare using diff. (This example assumes 21 | you're using a standard shell.) 22 | 23 | DBI_TRACE=2 perl yourscript.pl ...args1... 2>&1 | dbilogstrip > dbitrace1.log 24 | DBI_TRACE=2 perl yourscript.pl ...args2... 2>&1 | dbilogstrip > dbitrace2.log 25 | diff -u dbitrace1.log dbitrace2.log 26 | 27 | =head1 DESCRIPTION 28 | 29 | Replaces any hex addresses, e.g, C<0x128f72ce> with C<0xN>. 30 | 31 | Replaces any references to process id or thread id, like C with C. 32 | 33 | So a DBI trace line like this: 34 | 35 | -> STORE for DBD::DBM::st (DBI::st=HASH(0x19162a0)~0x191f9c8 'f_params' ARRAY(0x1922018)) thr#1800400 36 | 37 | will look like this: 38 | 39 | -> STORE for DBD::DBM::st (DBI::st=HASH(0xN)~0xN 'f_params' ARRAY(0xN)) thrN 40 | 41 | =cut 42 | 43 | use strict; 44 | 45 | while (<>) { 46 | # normalize hex addresses: 0xDEADHEAD => 0xN 47 | s/ \b 0x [0-9a-f]+ /0xN/gx; 48 | # normalize process and thread id number 49 | s/ \b (pid|tid|thr) \W? \d+ /${1}N/gx; 50 | 51 | } continue { 52 | print or die "-p destination: $!\n"; 53 | } 54 | 55 | 56 | SCRIPT 57 | 58 | require Config; 59 | my $config = {}; 60 | $config->{'startperl'} = $Config::Config{'startperl'}; 61 | 62 | $script =~ s/\~(\w+)\~/$config->{$1}/eg; 63 | if (!(open(FILE, ">$file")) || 64 | !(print FILE $script) || 65 | !(close(FILE))) { 66 | die "Error while writing $file: $!\n"; 67 | } 68 | chmod 0755, $file; 69 | print "Extracted $file from ",__FILE__," with variable substitutions.\n"; 70 | # syntax check resulting file, but only for developers 71 | exit 1 if -d ".svn" and system($^X, '-wc', '-Mblib', $file) != 0; 72 | 73 | -------------------------------------------------------------------------------- /dbivport.h: -------------------------------------------------------------------------------- 1 | /* dbivport.h 2 | 3 | Provides macros that enable greater portability between DBI versions. 4 | 5 | This file should be *copied* and included in driver distributions 6 | and #included into the source, after #include DBIXS.h 7 | 8 | New driver releases should include an updated copy of dbivport.h 9 | from the most recent DBI release. 10 | */ 11 | 12 | #ifndef DBI_VPORT_H 13 | #define DBI_VPORT_H 14 | 15 | #ifndef DBIh_SET_ERR_CHAR 16 | /* Emulate DBIh_SET_ERR_CHAR 17 | Only uses the err_i, errstr and state parameters. 18 | */ 19 | #define DBIh_SET_ERR_CHAR(h, imp_xxh, err_c, err_i, errstr, state, method) \ 20 | sv_setiv(DBIc_ERR(imp_xxh), err_i); \ 21 | (state) ? (void)sv_setpv(DBIc_STATE(imp_xxh), state) : (void)SvOK_off(DBIc_STATE(imp_xxh)); \ 22 | sv_setpv(DBIc_ERRSTR(imp_xxh), errstr) 23 | #endif 24 | 25 | #ifndef DBIcf_Executed 26 | #define DBIcf_Executed 0x080000 27 | #endif 28 | 29 | #ifndef DBIc_TRACE_LEVEL_MASK 30 | #define DBIc_TRACE_LEVEL_MASK 0x0000000F 31 | #define DBIc_TRACE_FLAGS_MASK 0xFFFFFF00 32 | #define DBIc_TRACE_SETTINGS(imp) (DBIc_DBISTATE(imp)->debug) 33 | #define DBIc_TRACE_LEVEL(imp) (DBIc_TRACE_SETTINGS(imp) & DBIc_TRACE_LEVEL_MASK) 34 | #define DBIc_TRACE_FLAGS(imp) (DBIc_TRACE_SETTINGS(imp) & DBIc_TRACE_FLAGS_MASK) 35 | /* DBIc_TRACE_MATCHES - true if s1 'matches' s2 (c.f. trace_msg()) 36 | DBIc_TRACE_MATCHES(foo, DBIc_TRACE_SETTINGS(imp)) 37 | */ 38 | #define DBIc_TRACE_MATCHES(s1, s2) \ 39 | ( ((s1 & DBIc_TRACE_LEVEL_MASK) >= (s2 & DBIc_TRACE_LEVEL_MASK)) \ 40 | || ((s1 & DBIc_TRACE_FLAGS_MASK) & (s2 & DBIc_TRACE_FLAGS_MASK)) ) 41 | /* DBIc_TRACE - true if flags match & DBI level>=flaglevel, or if DBI level>level 42 | DBIc_TRACE(imp, 0, 0, 4) = if level >= 4 43 | DBIc_TRACE(imp, DBDtf_FOO, 2, 4) = if tracing DBDtf_FOO & level>=2 or level>=4 44 | DBIc_TRACE(imp, DBDtf_FOO, 2, 0) = as above but never trace just due to level 45 | */ 46 | #define DBIc_TRACE(imp, flags, flaglevel, level) \ 47 | ( (flags && (DBIc_TRACE_FLAGS(imp) & flags) && (DBIc_TRACE_LEVEL(imp) >= flaglevel)) \ 48 | || (level && DBIc_TRACE_LEVEL(imp) >= level) ) 49 | #endif 50 | 51 | 52 | #endif /* !DBI_VPORT_H */ 53 | -------------------------------------------------------------------------------- /dbixs_rev.h: -------------------------------------------------------------------------------- 1 | /* Fri Mar 14 15:13:25 2025 */ 2 | #define DBIXS_RELEASE 1 3 | #define DBIXS_VERSION 648 4 | #define DBIXS_REVISION 1705 5 | -------------------------------------------------------------------------------- /dbixs_rev.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $dbixs_rev_file = "dbixs_rev.h"; 7 | 8 | sub skip_update { 9 | my $reason = shift; 10 | print "Skipping regeneration of $dbixs_rev_file: ", $reason, "\n"; 11 | utime (time (), time (), $dbixs_rev_file); # update modification time 12 | exit 0; 13 | } # skip_update 14 | 15 | -d ".git" or skip_update ("No git env"); 16 | 17 | my ($dbir, $dbiv); 18 | open my $fh, "<", "DBI.pm" or die "DBI.pm: $!\n"; 19 | while (<$fh>) { 20 | m/\b VERSION \s*=\s* (["']) ([0-9]+) \. ([0-9]+) \1/x or next; 21 | ($dbir, $dbiv) = ($2, $3); 22 | close $fh; 23 | last; 24 | } 25 | $dbir or die "Cannot fetch DBI version from DBI.pm\n"; 26 | 27 | my @n = eval { qx{git log --pretty=oneline} }; 28 | @n or skip_update ("Git log was empty"); 29 | 30 | open $fh, ">$dbixs_rev_file" or die "Can't open $dbixs_rev_file: $!\n"; 31 | print $fh "/* ", scalar localtime, " */\n"; 32 | 33 | chomp (my @st = qx{git status -s --show-stash}); 34 | print $fh "/* $_ */\n" for grep { !m/\b$dbixs_rev_file\b/ } @st; 35 | 36 | my $def = "DBIXS_REVISION"; 37 | my $rev = scalar @n; 38 | print $fh "#define DBIXS_RELEASE $dbir\n"; 39 | print $fh "#define DBIXS_VERSION $dbiv\n"; 40 | print $fh "#define $def $rev\n"; 41 | close $fh or die "Error closing $dbixs_rev_file: $!\n"; 42 | print "Wrote $def $rev to $dbixs_rev_file for DBI-$dbir.$dbiv\n"; 43 | -------------------------------------------------------------------------------- /devel/.perltidyrc-timbunce: -------------------------------------------------------------------------------- 1 | # Perl Best Practices .perltidyrc file (plus official errata) 2 | 3 | -l=78 # Max line width is 78 cols 4 | -i=4 # Indent level is 4 cols 5 | -ci=4 # Continuation indent is 4 cols 6 | -vt=2 # Maximal vertical tightness 7 | -cti=0 # No extra indentation for closing brackets 8 | -pt=1 # Medium parenthesis tightness 9 | -bt=1 # Medium brace tightness 10 | -sbt=1 # Medium square bracket tightness 11 | -bbt=1 # Medium block brace tightness 12 | -nsfs # No space before semicolons 13 | -nolq # Don't outdent long quoted strings 14 | -wbb="% + - * / x != == >= <= =~ < > | & **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" 15 | # Break before all operators 16 | 17 | # extras/overrides 18 | 19 | --maximum-line-length=100 # be slightly more generous 20 | --warning-output # Show warnings 21 | --maximum-consecutive-blank-lines=2 # default is 1 22 | --nohanging-side-comments # troublesome for commented out code 23 | 24 | # vim:ts=8:sw=4:et 25 | -------------------------------------------------------------------------------- /devel/.perltidyrc-tux: -------------------------------------------------------------------------------- 1 | # See how far we get in getting perltidy to do the *only* right thing: my way 2 | 3 | --noblanks-before-comments 4 | --block-brace-tightness=0 5 | --brace-tightness=2 6 | --brace-vertical-tightness=2 7 | --closing-token-indentation=3 8 | --continuation-indentation=4 9 | --entab-leading-whitespace=8 10 | #--noindent-block-comments 11 | --indent-closing-brace 12 | --indent-columns=4 13 | # try with and without this: 14 | #--line-up-parentheses 15 | --maximum-line-length=80 16 | --opening-brace-always-on-right 17 | --opening-hash-brace-right 18 | --opening-paren-right 19 | --opening-square-bracket-right 20 | --opening-sub-brace-on-new-line 21 | --nooutdent-long-comments 22 | --nooutdent-long-quotes 23 | --paren-tightness=2 24 | --paren-vertical-tightness=2 25 | --nospace-for-semicolon 26 | --space-function-paren 27 | --space-keyword-paren 28 | --square-bracket-tightness=2 29 | --square-bracket-vertical-tightness=2 30 | --stack-closing-hash-brace 31 | --stack-closing-paren 32 | --stack-closing-square-bracket 33 | --stack-opening-hash-brace 34 | --stack-opening-paren 35 | --stack-opening-square-bracket 36 | --static-block-comment-prefix="^#" 37 | --static-side-comments 38 | # try with and without some or all of these 39 | #--want-break-after=". : || && and or" 40 | 41 | -------------------------------------------------------------------------------- /devel/README: -------------------------------------------------------------------------------- 1 | DBI being maintained by several people now causes a mixture 2 | of styles. It has been proven that people are most productive 3 | when they can do things `their way'. 4 | 5 | Tim Bunce is the owner and main maintainer of DBI. He can and 6 | should veto anything that is forbidden, but for now, you'll 7 | see different styles for the modules that have a single person 8 | responsible for development. You might find a perltidyrc file 9 | for their style in this devel/ directory. When proposing new 10 | features, additions, fixes or documentation, please try to do 11 | so in the style of that specific module. 12 | 13 | Perltidy might help. 14 | 15 | Default (essentially the same as in Perl Best Practices book): 16 | devel/.perltidyrc-timbunce 17 | 18 | DBD::File - H.Merijn Brand (Tux) 19 | devel/.perltidyrc-tux 20 | -------------------------------------------------------------------------------- /devel/genPPPort_h.pl: -------------------------------------------------------------------------------- 1 | #!/pro/bin/perl 2 | 3 | use 5.12.1; 4 | use warnings; 5 | 6 | use Devel::PPPort; 7 | use File::Copy; 8 | 9 | # Check to see if Devel::PPPort needs updating 10 | my $ph = "dbipport.h"; 11 | 12 | if (-f $ph) { 13 | my ($cv) = (qx{perl $ph --version} =~ m{\b([0-9]\.\w+)}); 14 | if ($Devel::PPPort::VERSION lt $cv) { 15 | warn "Your $ph is newer than Devel::PPPort. Update skipped\n"; 16 | } 17 | else { 18 | my $old = do { local (@ARGV, $/) = ($ph); <> }; 19 | move $ph, "$ph.bkp"; 20 | 21 | Devel::PPPort::WriteFile ($ph); 22 | 23 | my $new = do { local (@ARGV, $/) = ($ph); <> }; 24 | 25 | if ($old ne $new) { 26 | warn "$ph updated to $Devel::PPPort::VERSION\n"; 27 | unlink "$ph.bkp"; 28 | } 29 | else { 30 | unlink $ph; 31 | move "$ph.bkp", $ph; 32 | } 33 | } 34 | } 35 | else { 36 | Devel::PPPort::WriteFile ("$ph"); 37 | warn "Installed new $ph $Devel::PPPort::VERSION\n"; 38 | } 39 | 40 | my $cv = "5.8.1"; 41 | if (open my $fh, "<", "Makefile.PL") { 42 | for (grep m/MIN_PERL_VERSION/ => <$fh>) { 43 | m/\b(5\.[0-9._]+)\b/ or next; 44 | my @v = split m/[._]/ => $1; 45 | $v[1] =~ m/^(\d\d\d)(.*)/ and splice @v, 1, 1, $1, $2; 46 | $v[2] ||= 0; 47 | $cv = join "." => map { $_ + 0 } @v; 48 | } 49 | } 50 | 51 | warn "Checking against minimum perl version $cv\n"; 52 | my @ppp = qx{perl $ph --compat-version=$cv --quiet DBI.xs} or exit 0; 53 | 54 | # Devel::PPPort does not take indirect includes into account :( 55 | my (@ph, $phi); 56 | if (open my $fh, "<", "DBIXS.h") { 57 | while (<$fh>) { 58 | push @ph, $_; 59 | m/^#include "$ph"$/ and $phi = @ph; 60 | } 61 | } 62 | $ppp[$_] =~ s/\bDBI\.xs\b/DBIXS.h/ for 0, 1; 63 | if (my @i = grep { $ppp[$_] =~ m/^\+#include "$ph"$/ } 0 .. $#ppp) { 64 | my $cf = $phi - 3; 65 | $ppp[$i[0]] =~ s/^\+/ /; 66 | $ppp[2] =~ s/ -\K1,(\d+)/sprintf " -%d,%d", $cf, $1 + 3/e; 67 | $ppp[2] =~ s/ \+\K1,(\d+)/sprintf " +%d,%d", $cf, $1 + 2/e; 68 | splice @ppp, $i[0] + 1, 3, map { $ph[$_] =~ s/^/ /r } $phi .. ($phi + 1); 69 | splice @ppp, 3, 0, map { $ph[$_] =~ s/^/ /r } ($cf - 1) .. ($cf + 1); 70 | } 71 | warn 72 | "Devel::PPPort suggests the following change:\n", 73 | "--8<---\n", 74 | @ppp, 75 | "-->8---\n", 76 | "run 'perl $ph --compat-version=$cv DBI.xs' to see why\n"; 77 | -------------------------------------------------------------------------------- /doc/Bundle-DBI.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bundle::DBI - A bundle to install DBI and required modules. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 |

NAME

23 | 24 |

Bundle::DBI - A bundle to install DBI and required modules.

25 | 26 |

SYNOPSIS

27 | 28 |
perl -MCPAN -e 'install Bundle::DBI'
29 | 30 |

CONTENTS

31 | 32 |

DBI - for to get to know thyself

33 | 34 |

DBI::Shell 11.91 - the DBI command line shell

35 | 36 |

Storable 2.06 - for DBD::Proxy, DBI::ProxyServer, DBD::Forward

37 | 38 |

Net::Daemon 0.37 - for DBD::Proxy and DBI::ProxyServer

39 | 40 |

RPC::PlServer 0.2016 - for DBD::Proxy and DBI::ProxyServer

41 | 42 |

DBD::Multiplex 1.19 - treat multiple db handles as one

43 | 44 |

DESCRIPTION

45 | 46 |

This bundle includes all the modules used by the Perl Database Interface (DBI) module, created by Tim Bunce.

47 | 48 |

A Bundle is a module that simply defines a collection of other modules. It is used by the CPAN module to automate the fetching, building and installing of modules from the CPAN ftp archive sites.

49 | 50 |

This bundle does not deal with the various database drivers (e.g. DBD::Informix, DBD::Oracle etc), most of which require software from sources other than CPAN. You'll need to fetch and build those drivers yourself.

51 | 52 |

AUTHORS

53 | 54 |

Jonathan Leffler, Jochen Wiedmann and Tim Bunce.

55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /doc/Bundle-DBI.man: -------------------------------------------------------------------------------- 1 | Bundle::DBI(3) User Contributed Perl Documentation Bundle::DBI(3) 2 | 3 | NAME 4 | Bundle::DBI - A bundle to install DBI and required modules. 5 | 6 | SYNOPSIS 7 | perl -MCPAN -e 'install Bundle::DBI' 8 | 9 | CONTENTS 10 | DBI - for to get to know thyself 11 | 12 | DBI::Shell 11.91 - the DBI command line shell 13 | 14 | Storable 2.06 - for DBD::Proxy, DBI::ProxyServer, DBD::Forward 15 | 16 | Net::Daemon 0.37 - for DBD::Proxy and DBI::ProxyServer 17 | 18 | RPC::PlServer 0.2016 - for DBD::Proxy and DBI::ProxyServer 19 | 20 | DBD::Multiplex 1.19 - treat multiple db handles as one 21 | 22 | DESCRIPTION 23 | This bundle includes all the modules used by the Perl Database 24 | Interface (DBI) module, created by Tim Bunce. 25 | 26 | A Bundle is a module that simply defines a collection of other modules. 27 | It is used by the CPAN module to automate the fetching, building and 28 | installing of modules from the CPAN ftp archive sites. 29 | 30 | This bundle does not deal with the various database drivers (e.g. 31 | DBD::Informix, DBD::Oracle etc), most of which require software from 32 | sources other than CPAN. You'll need to fetch and build those drivers 33 | yourself. 34 | 35 | AUTHORS 36 | Jonathan Leffler, Jochen Wiedmann and Tim Bunce. 37 | 38 | perl v5.40.1 2024-08-13 Bundle::DBI(3) 39 | -------------------------------------------------------------------------------- /doc/Bundle-DBI.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | Bundle::DBI - A bundle to install DBI and required modules. 4 | 5 | # SYNOPSIS 6 | 7 | perl -MCPAN -e 'install Bundle::DBI' 8 | 9 | # CONTENTS 10 | 11 | DBI - for to get to know thyself 12 | 13 | DBI::Shell 11.91 - the DBI command line shell 14 | 15 | Storable 2.06 - for DBD::Proxy, DBI::ProxyServer, DBD::Forward 16 | 17 | Net::Daemon 0.37 - for DBD::Proxy and DBI::ProxyServer 18 | 19 | RPC::PlServer 0.2016 - for DBD::Proxy and DBI::ProxyServer 20 | 21 | DBD::Multiplex 1.19 - treat multiple db handles as one 22 | 23 | # DESCRIPTION 24 | 25 | This bundle includes all the modules used by the Perl Database 26 | Interface (DBI) module, created by Tim Bunce. 27 | 28 | A _Bundle_ is a module that simply defines a collection of other 29 | modules. It is used by the [CPAN](https://metacpan.org/pod/CPAN) module to automate the fetching, 30 | building and installing of modules from the CPAN ftp archive sites. 31 | 32 | This bundle does not deal with the various database drivers (e.g. 33 | DBD::Informix, DBD::Oracle etc), most of which require software from 34 | sources other than CPAN. You'll need to fetch and build those drivers 35 | yourself. 36 | 37 | # AUTHORS 38 | 39 | Jonathan Leffler, Jochen Wiedmann and Tim Bunce. 40 | -------------------------------------------------------------------------------- /doc/DBD-ExampleP.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-classic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DBD::Gofer::Policy::classic - The 'classic' policy for DBD::Gofer 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 |

NAME

23 | 24 |

DBD::Gofer::Policy::classic - The 'classic' policy for DBD::Gofer

25 | 26 |

SYNOPSIS

27 | 28 |
$dbh = DBI->connect("dbi:Gofer:transport=...;policy=classic", ...)
29 | 30 |

The classic policy is the default DBD::Gofer policy, so need not be included in the DSN.

31 | 32 |

DESCRIPTION

33 | 34 |

Temporary docs: See the source code for list of policies and their defaults.

35 | 36 |

In a future version the policies and their defaults will be defined in the pod and parsed out at load-time.

37 | 38 |

AUTHOR

39 | 40 |

Tim Bunce, http://www.tim.bunce.name

41 | 42 |

LICENCE AND COPYRIGHT

43 | 44 |

Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved.

45 | 46 |

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-classic.man: -------------------------------------------------------------------------------- 1 | DBD::Go...:classic(3) User Contributed Perl DocumentationDBD::Go...:classic(3) 2 | 3 | NAME 4 | DBD::Gofer::Policy::classic - The 'classic' policy for DBD::Gofer 5 | 6 | SYNOPSIS 7 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=classic", ...) 8 | 9 | The "classic" policy is the default DBD::Gofer policy, so need not be 10 | included in the DSN. 11 | 12 | DESCRIPTION 13 | Temporary docs: See the source code for list of policies and their 14 | defaults. 15 | 16 | In a future version the policies and their defaults will be defined in 17 | the pod and parsed out at load-time. 18 | 19 | AUTHOR 20 | Tim Bunce, 21 | 22 | LICENCE AND COPYRIGHT 23 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 24 | 25 | This module is free software; you can redistribute it and/or modify it 26 | under the same terms as Perl itself. See perlartistic. 27 | 28 | perl v5.40.1 2025-01-17 DBD::Go...:classic(3) 29 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-classic.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | DBD::Gofer::Policy::classic - The 'classic' policy for DBD::Gofer 4 | 5 | # SYNOPSIS 6 | 7 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=classic", ...) 8 | 9 | The `classic` policy is the default DBD::Gofer policy, so need not be included in the DSN. 10 | 11 | # DESCRIPTION 12 | 13 | Temporary docs: See the source code for list of policies and their defaults. 14 | 15 | In a future version the policies and their defaults will be defined in the pod and parsed out at load-time. 16 | 17 | # AUTHOR 18 | 19 | Tim Bunce, [http://www.tim.bunce.name](http://www.tim.bunce.name) 20 | 21 | # LICENCE AND COPYRIGHT 22 | 23 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 24 | 25 | This module is free software; you can redistribute it and/or 26 | modify it under the same terms as Perl itself. See [perlartistic](https://metacpan.org/pod/perlartistic). 27 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-pedantic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DBD::Gofer::Policy::pedantic - The 'pedantic' policy for DBD::Gofer 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 |

NAME

23 | 24 |

DBD::Gofer::Policy::pedantic - The 'pedantic' policy for DBD::Gofer

25 | 26 |

SYNOPSIS

27 | 28 |
$dbh = DBI->connect("dbi:Gofer:transport=...;policy=pedantic", ...)
29 | 30 |

DESCRIPTION

31 | 32 |

The pedantic policy tries to be as transparent as possible. To do this it makes round-trips to the server for almost every DBI method call.

33 | 34 |

This is the best policy to use when first testing existing code with Gofer. Once it's working well you should consider moving to the classic policy or defining your own policy class.

35 | 36 |

Temporary docs: See the source code for list of policies and their defaults.

37 | 38 |

In a future version the policies and their defaults will be defined in the pod and parsed out at load-time.

39 | 40 |

AUTHOR

41 | 42 |

Tim Bunce, http://www.tim.bunce.name

43 | 44 |

LICENCE AND COPYRIGHT

45 | 46 |

Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved.

47 | 48 |

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-pedantic.man: -------------------------------------------------------------------------------- 1 | DBD::Go...edantic(3) User Contributed Perl Documentation DBD::Go...edantic(3) 2 | 3 | NAME 4 | DBD::Gofer::Policy::pedantic - The 'pedantic' policy for DBD::Gofer 5 | 6 | SYNOPSIS 7 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=pedantic", ...) 8 | 9 | DESCRIPTION 10 | The "pedantic" policy tries to be as transparent as possible. To do 11 | this it makes round-trips to the server for almost every DBI method 12 | call. 13 | 14 | This is the best policy to use when first testing existing code with 15 | Gofer. Once it's working well you should consider moving to the 16 | "classic" policy or defining your own policy class. 17 | 18 | Temporary docs: See the source code for list of policies and their 19 | defaults. 20 | 21 | In a future version the policies and their defaults will be defined in 22 | the pod and parsed out at load-time. 23 | 24 | AUTHOR 25 | Tim Bunce, 26 | 27 | LICENCE AND COPYRIGHT 28 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 29 | 30 | This module is free software; you can redistribute it and/or modify it 31 | under the same terms as Perl itself. See perlartistic. 32 | 33 | perl v5.40.1 2013-06-03 DBD::Go...edantic(3) 34 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-pedantic.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | DBD::Gofer::Policy::pedantic - The 'pedantic' policy for DBD::Gofer 4 | 5 | # SYNOPSIS 6 | 7 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=pedantic", ...) 8 | 9 | # DESCRIPTION 10 | 11 | The `pedantic` policy tries to be as transparent as possible. To do this it 12 | makes round-trips to the server for almost every DBI method call. 13 | 14 | This is the best policy to use when first testing existing code with Gofer. 15 | Once it's working well you should consider moving to the `classic` policy or defining your own policy class. 16 | 17 | Temporary docs: See the source code for list of policies and their defaults. 18 | 19 | In a future version the policies and their defaults will be defined in the pod and parsed out at load-time. 20 | 21 | # AUTHOR 22 | 23 | Tim Bunce, [http://www.tim.bunce.name](http://www.tim.bunce.name) 24 | 25 | # LICENCE AND COPYRIGHT 26 | 27 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 28 | 29 | This module is free software; you can redistribute it and/or 30 | modify it under the same terms as Perl itself. See [perlartistic](https://metacpan.org/pod/perlartistic). 31 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-rush.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DBD::Gofer::Policy::rush - The 'rush' policy for DBD::Gofer 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 |

NAME

23 | 24 |

DBD::Gofer::Policy::rush - The 'rush' policy for DBD::Gofer

25 | 26 |

SYNOPSIS

27 | 28 |
$dbh = DBI->connect("dbi:Gofer:transport=...;policy=rush", ...)
29 | 30 |

DESCRIPTION

31 | 32 |

The rush policy tries to make as few round-trips as possible. It's the opposite end of the policy spectrum to the pedantic policy.

33 | 34 |

Temporary docs: See the source code for list of policies and their defaults.

35 | 36 |

In a future version the policies and their defaults will be defined in the pod and parsed out at load-time.

37 | 38 |

AUTHOR

39 | 40 |

Tim Bunce, http://www.tim.bunce.name

41 | 42 |

LICENCE AND COPYRIGHT

43 | 44 |

Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved.

45 | 46 |

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-rush.man: -------------------------------------------------------------------------------- 1 | DBD::Go...y::rush(3) User Contributed Perl Documentation DBD::Go...y::rush(3) 2 | 3 | NAME 4 | DBD::Gofer::Policy::rush - The 'rush' policy for DBD::Gofer 5 | 6 | SYNOPSIS 7 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=rush", ...) 8 | 9 | DESCRIPTION 10 | The "rush" policy tries to make as few round-trips as possible. It's 11 | the opposite end of the policy spectrum to the "pedantic" policy. 12 | 13 | Temporary docs: See the source code for list of policies and their 14 | defaults. 15 | 16 | In a future version the policies and their defaults will be defined in 17 | the pod and parsed out at load-time. 18 | 19 | AUTHOR 20 | Tim Bunce, 21 | 22 | LICENCE AND COPYRIGHT 23 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 24 | 25 | This module is free software; you can redistribute it and/or modify it 26 | under the same terms as Perl itself. See perlartistic. 27 | 28 | perl v5.40.1 2025-01-17 DBD::Go...y::rush(3) 29 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Policy-rush.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | DBD::Gofer::Policy::rush - The 'rush' policy for DBD::Gofer 4 | 5 | # SYNOPSIS 6 | 7 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=rush", ...) 8 | 9 | # DESCRIPTION 10 | 11 | The `rush` policy tries to make as few round-trips as possible. 12 | It's the opposite end of the policy spectrum to the `pedantic` policy. 13 | 14 | Temporary docs: See the source code for list of policies and their defaults. 15 | 16 | In a future version the policies and their defaults will be defined in the pod and parsed out at load-time. 17 | 18 | # AUTHOR 19 | 20 | Tim Bunce, [http://www.tim.bunce.name](http://www.tim.bunce.name) 21 | 22 | # LICENCE AND COPYRIGHT 23 | 24 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 25 | 26 | This module is free software; you can redistribute it and/or 27 | modify it under the same terms as Perl itself. See [perlartistic](https://metacpan.org/pod/perlartistic). 28 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Transport-null.man: -------------------------------------------------------------------------------- 1 | DBD::Go...rt::null(3) User Contributed Perl DocumentationDBD::Go...rt::null(3) 2 | 3 | NAME 4 | DBD::Gofer::Transport::null - DBD::Gofer client transport for testing 5 | 6 | SYNOPSIS 7 | my $original_dsn = "..." 8 | DBI->connect("dbi:Gofer:transport=null;dsn=$original_dsn",...) 9 | 10 | or, enable by setting the DBI_AUTOPROXY environment variable: 11 | 12 | export DBI_AUTOPROXY="dbi:Gofer:transport=null" 13 | 14 | DESCRIPTION 15 | Connect via DBD::Gofer but execute the requests within the same 16 | process. 17 | 18 | This is a quick and simple way to test applications for compatibility 19 | with the (few) restrictions that DBD::Gofer imposes. 20 | 21 | It also provides a simple, portable way for the DBI test suite to be 22 | used to test DBD::Gofer on all platforms with no setup. 23 | 24 | Also, by measuring the difference in performance between normal 25 | connections and connections via "dbi:Gofer:transport=null" the basic 26 | cost of using DBD::Gofer can be measured. Furthermore, the additional 27 | cost of more advanced transports can be isolated by comparing their 28 | performance with the null transport. 29 | 30 | The "t/85gofer.t" script in the DBI distribution includes a comparative 31 | benchmark. 32 | 33 | AUTHOR 34 | Tim Bunce, 35 | 36 | LICENCE AND COPYRIGHT 37 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 38 | 39 | This module is free software; you can redistribute it and/or modify it 40 | under the same terms as Perl itself. See perlartistic. 41 | 42 | SEE ALSO 43 | DBD::Gofer::Transport::Base 44 | 45 | DBD::Gofer 46 | 47 | perl v5.40.1 2013-06-03 DBD::Go...rt::null(3) 48 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Transport-null.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | DBD::Gofer::Transport::null - DBD::Gofer client transport for testing 4 | 5 | # SYNOPSIS 6 | 7 | my $original_dsn = "..." 8 | DBI->connect("dbi:Gofer:transport=null;dsn=$original_dsn",...) 9 | 10 | or, enable by setting the DBI\_AUTOPROXY environment variable: 11 | 12 | export DBI_AUTOPROXY="dbi:Gofer:transport=null" 13 | 14 | # DESCRIPTION 15 | 16 | Connect via DBD::Gofer but execute the requests within the same process. 17 | 18 | This is a quick and simple way to test applications for compatibility with the 19 | (few) restrictions that DBD::Gofer imposes. 20 | 21 | It also provides a simple, portable way for the DBI test suite to be used to 22 | test DBD::Gofer on all platforms with no setup. 23 | 24 | Also, by measuring the difference in performance between normal connections and 25 | connections via `dbi:Gofer:transport=null` the basic cost of using DBD::Gofer 26 | can be measured. Furthermore, the additional cost of more advanced transports can be 27 | isolated by comparing their performance with the null transport. 28 | 29 | The `t/85gofer.t` script in the DBI distribution includes a comparative benchmark. 30 | 31 | # AUTHOR 32 | 33 | Tim Bunce, [http://www.tim.bunce.name](http://www.tim.bunce.name) 34 | 35 | # LICENCE AND COPYRIGHT 36 | 37 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 38 | 39 | This module is free software; you can redistribute it and/or 40 | modify it under the same terms as Perl itself. See [perlartistic](https://metacpan.org/pod/perlartistic). 41 | 42 | # SEE ALSO 43 | 44 | [DBD::Gofer::Transport::Base](https://metacpan.org/pod/DBD%3A%3AGofer%3A%3ATransport%3A%3ABase) 45 | 46 | [DBD::Gofer](https://metacpan.org/pod/DBD%3A%3AGofer) 47 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Transport-pipeone.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DBD::Gofer::Transport::pipeone - DBD::Gofer client transport for testing 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 23 |

NAME

24 | 25 |

DBD::Gofer::Transport::pipeone - DBD::Gofer client transport for testing

26 | 27 |

SYNOPSIS

28 | 29 |
$original_dsn = "...";
30 | DBI->connect("dbi:Gofer:transport=pipeone;dsn=$original_dsn",...)
31 | 32 |

or, enable by setting the DBI_AUTOPROXY environment variable:

33 | 34 |
export DBI_AUTOPROXY="dbi:Gofer:transport=pipeone"
35 | 36 |

DESCRIPTION

37 | 38 |

Connect via DBD::Gofer and execute each request by starting executing a subprocess.

39 | 40 |

This is, as you might imagine, spectacularly inefficient!

41 | 42 |

It's only intended for testing. Specifically it demonstrates that the server side is completely stateless.

43 | 44 |

It also provides a base class for the much more useful DBD::Gofer::Transport::stream transport.

45 | 46 |

AUTHOR

47 | 48 |

Tim Bunce, http://www.tim.bunce.name

49 | 50 |

LICENCE AND COPYRIGHT

51 | 52 |

Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved.

53 | 54 |

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

55 | 56 |

SEE ALSO

57 | 58 |

DBD::Gofer::Transport::Base

59 | 60 |

DBD::Gofer

61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Transport-pipeone.man: -------------------------------------------------------------------------------- 1 | DBD::Go...pipeone(3) User Contributed Perl Documentation DBD::Go...pipeone(3) 2 | 3 | NAME 4 | DBD::Gofer::Transport::pipeone - DBD::Gofer client transport for 5 | testing 6 | 7 | SYNOPSIS 8 | $original_dsn = "..."; 9 | DBI->connect("dbi:Gofer:transport=pipeone;dsn=$original_dsn",...) 10 | 11 | or, enable by setting the DBI_AUTOPROXY environment variable: 12 | 13 | export DBI_AUTOPROXY="dbi:Gofer:transport=pipeone" 14 | 15 | DESCRIPTION 16 | Connect via DBD::Gofer and execute each request by starting executing a 17 | subprocess. 18 | 19 | This is, as you might imagine, spectacularly inefficient! 20 | 21 | It's only intended for testing. Specifically it demonstrates that the 22 | server side is completely stateless. 23 | 24 | It also provides a base class for the much more useful 25 | DBD::Gofer::Transport::stream transport. 26 | 27 | AUTHOR 28 | Tim Bunce, 29 | 30 | LICENCE AND COPYRIGHT 31 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 32 | 33 | This module is free software; you can redistribute it and/or modify it 34 | under the same terms as Perl itself. See perlartistic. 35 | 36 | SEE ALSO 37 | DBD::Gofer::Transport::Base 38 | 39 | DBD::Gofer 40 | 41 | perl v5.40.1 2025-01-17 DBD::Go...pipeone(3) 42 | -------------------------------------------------------------------------------- /doc/DBD-Gofer-Transport-pipeone.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | DBD::Gofer::Transport::pipeone - DBD::Gofer client transport for testing 4 | 5 | # SYNOPSIS 6 | 7 | $original_dsn = "..."; 8 | DBI->connect("dbi:Gofer:transport=pipeone;dsn=$original_dsn",...) 9 | 10 | or, enable by setting the DBI\_AUTOPROXY environment variable: 11 | 12 | export DBI_AUTOPROXY="dbi:Gofer:transport=pipeone" 13 | 14 | # DESCRIPTION 15 | 16 | Connect via DBD::Gofer and execute each request by starting executing a subprocess. 17 | 18 | This is, as you might imagine, spectacularly inefficient! 19 | 20 | It's only intended for testing. Specifically it demonstrates that the server 21 | side is completely stateless. 22 | 23 | It also provides a base class for the much more useful [DBD::Gofer::Transport::stream](https://metacpan.org/pod/DBD%3A%3AGofer%3A%3ATransport%3A%3Astream) 24 | transport. 25 | 26 | # AUTHOR 27 | 28 | Tim Bunce, [http://www.tim.bunce.name](http://www.tim.bunce.name) 29 | 30 | # LICENCE AND COPYRIGHT 31 | 32 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 33 | 34 | This module is free software; you can redistribute it and/or 35 | modify it under the same terms as Perl itself. See [perlartistic](https://metacpan.org/pod/perlartistic). 36 | 37 | # SEE ALSO 38 | 39 | [DBD::Gofer::Transport::Base](https://metacpan.org/pod/DBD%3A%3AGofer%3A%3ATransport%3A%3ABase) 40 | 41 | [DBD::Gofer](https://metacpan.org/pod/DBD%3A%3AGofer) 42 | -------------------------------------------------------------------------------- /doc/DBD-Multiplex-Logic-Default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/DBD-NullP.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/DBD-Sponge.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | DBD::Sponge - Create a DBI statement handle from Perl data 4 | 5 | # SYNOPSIS 6 | 7 | my $sponge = DBI->connect("dbi:Sponge:","","",{ RaiseError => 1 }); 8 | my $sth = $sponge->prepare($statement, { 9 | rows => $data, 10 | NAME => $names, 11 | %attr 12 | } 13 | ); 14 | 15 | # DESCRIPTION 16 | 17 | DBD::Sponge is useful for making a Perl data structure accessible through a 18 | standard DBI statement handle. This may be useful to DBD module authors who 19 | need to transform data in this way. 20 | 21 | # METHODS 22 | 23 | ## connect() 24 | 25 | my $sponge = DBI->connect("dbi:Sponge:","","",{ RaiseError => 1 }); 26 | 27 | Here's a sample syntax for creating a database handle for the Sponge driver. 28 | No username and password are needed. 29 | 30 | ## prepare() 31 | 32 | my $sth = $sponge->prepare($statement, { 33 | rows => $data, 34 | NAME => $names, 35 | %attr 36 | } 37 | ); 38 | 39 | - The `$statement` here is an arbitrary statement or name you want 40 | to provide as identity of your data. If you're using DBI::Profile 41 | it will appear in the profile data. 42 | 43 | Generally it's expected that you are preparing a statement handle 44 | as if a `select` statement happened. 45 | 46 | - `$data` is a reference to the data you are providing, given as an array of arrays. 47 | - `$names` is a reference an array of column names for the `$data` you are providing. 48 | The number and order should match the number and ordering of the `$data` columns. 49 | - `%attr` is a hash of other standard DBI attributes that you might pass to a prepare statement. 50 | 51 | Currently only NAME, TYPE, and PRECISION are supported. 52 | 53 | # BUGS 54 | 55 | Using this module to prepare INSERT-like statements is not currently documented. 56 | 57 | # AUTHOR AND COPYRIGHT 58 | 59 | This module is Copyright (c) 2003 Tim Bunce 60 | 61 | Documentation initially written by Mark Stosberg 62 | 63 | The DBD::Sponge module is free software; you can redistribute it and/or 64 | modify it under the same terms as Perl itself. In particular permission 65 | is granted to Tim Bunce for distributing this as a part of the DBI. 66 | 67 | # SEE ALSO 68 | 69 | [DBI](https://metacpan.org/pod/DBI) 70 | -------------------------------------------------------------------------------- /doc/Win32-DBIODBC.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Win32::DBIODBC - Win32::ODBC emulation layer for the DBI 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 |

NAME

23 | 24 |

Win32::DBIODBC - Win32::ODBC emulation layer for the DBI

25 | 26 |

SYNOPSIS

27 | 28 |
use Win32::DBIODBC;     # instead of use Win32::ODBC
29 | 30 |

DESCRIPTION

31 | 32 |

This is a very basic very alpha quality Win32::ODBC emulation for the DBI. To use it just replace

33 | 34 |
use Win32::ODBC;
35 | 36 |

in your scripts with

37 | 38 |
use Win32::DBIODBC;
39 | 40 |

or, while experimenting, you can pre-load this module without changing your scripts by doing

41 | 42 |
perl -MWin32::DBIODBC your_script_name
43 | 44 |

TO DO

45 | 46 |

Error handling is virtually non-existent.

47 | 48 |

AUTHOR

49 | 50 |

Tom Horen <tho@melexis.com>

51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /doc/Win32-DBIODBC.man: -------------------------------------------------------------------------------- 1 | Win32::DBIODBC(3) User Contributed Perl Documentation Win32::DBIODBC(3) 2 | 3 | NAME 4 | Win32::DBIODBC - Win32::ODBC emulation layer for the DBI 5 | 6 | SYNOPSIS 7 | use Win32::DBIODBC; # instead of use Win32::ODBC 8 | 9 | DESCRIPTION 10 | This is a very basic very alpha quality Win32::ODBC emulation for the 11 | DBI. To use it just replace 12 | 13 | use Win32::ODBC; 14 | 15 | in your scripts with 16 | 17 | use Win32::DBIODBC; 18 | 19 | or, while experimenting, you can pre-load this module without changing 20 | your scripts by doing 21 | 22 | perl -MWin32::DBIODBC your_script_name 23 | 24 | TO DO 25 | Error handling is virtually non-existent. 26 | 27 | AUTHOR 28 | Tom Horen 29 | 30 | perl v5.40.1 2025-01-17 Win32::DBIODBC(3) 31 | -------------------------------------------------------------------------------- /doc/Win32-DBIODBC.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | Win32::DBIODBC - Win32::ODBC emulation layer for the DBI 4 | 5 | # SYNOPSIS 6 | 7 | use Win32::DBIODBC; # instead of use Win32::ODBC 8 | 9 | # DESCRIPTION 10 | 11 | This is a _very_ basic _very_ alpha quality Win32::ODBC emulation 12 | for the DBI. To use it just replace 13 | 14 | use Win32::ODBC; 15 | 16 | in your scripts with 17 | 18 | use Win32::DBIODBC; 19 | 20 | or, while experimenting, you can pre-load this module without changing your 21 | scripts by doing 22 | 23 | perl -MWin32::DBIODBC your_script_name 24 | 25 | # TO DO 26 | 27 | Error handling is virtually non-existent. 28 | 29 | # AUTHOR 30 | 31 | Tom Horen 32 | -------------------------------------------------------------------------------- /err_new/err_mxauth.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perl5-dbi/dbi/b9cc7cca3d71b0ce5dfcb86d79c81764e0b24176/err_new/err_mxauth.msg -------------------------------------------------------------------------------- /err_new/err_proxyrpc.msg: -------------------------------------------------------------------------------- 1 | From www@webmail.lf.net Mon Jun 9 10:49:58 2003 2 | Received: from localhost (localhost [127.0.0.1]) 3 | by dansat.data-plan.com (8.12.9/8.12.9) with ESMTP id h599no0r043230 4 | for ; Mon, 9 Jun 2003 10:49:58 +0100 (BST) 5 | (envelope-from www@webmail.lf.net) 6 | Received: from pop3.mail.demon.net [194.217.242.253] 7 | by localhost with POP3 (fetchmail-5.8.5) 8 | for timbo@localhost (single-drop); Mon, 09 Jun 2003 10:49:58 +0100 (BST) 9 | Received: from punt-2.mail.demon.net by mailstore for Tim.Bunce@data-plan.com 10 | id 1055151227:20:05173:26; Mon, 09 Jun 2003 09:33:47 GMT 11 | Received: from icicle-214-2.pobox.com ([207.8.214.2]) by punt-2.mail.demon.net 12 | id aa2005474; 9 Jun 2003 9:33 GMT 13 | Received: from icicle.pobox.com (localhost [127.0.0.1]) 14 | by icicle.pobox.com (Postfix) with ESMTP id 5FF9058276 15 | for ; Mon, 9 Jun 2003 05:32:58 -0400 (EDT) 16 | Delivered-To: tim.bunce@pobox.com 17 | Received: from webmail.LF.net (webmail.LF.net [212.9.160.14]) 18 | by icicle.pobox.com (Postfix) with ESMTP id DF4D058310 19 | for ; Mon, 9 Jun 2003 05:32:57 -0400 (EDT) 20 | Received: from www by webmail.LF.net with local (Exim 4.14) 21 | id 19PJ1M-0002fF-62; Mon, 09 Jun 2003 11:32:56 +0200 22 | To: Tim Bunce 23 | Subject: Re: Proposed patches for PlRPC and Proxy 24 | Message-ID: <1055151176.3ee45448162a7@webmail.LF.net> 25 | Date: Mon, 09 Jun 2003 11:32:56 +0200 (CEST) 26 | From: Jochen Wiedmann 27 | Cc: "Steven N. Hirsch" , dbi-dev@perl.org 28 | References: <20030510212815.GA12263@dansat.data-plan.com> 29 | In-Reply-To: <20030510212815.GA12263@dansat.data-plan.com> 30 | MIME-Version: 1.0 31 | Content-Type: text/plain; charset=ISO-8859-1 32 | Content-Transfer-Encoding: 8bit 33 | User-Agent: IMP/PHP IMAP webmail program 2.2.6 34 | X-Originating-IP: 193.26.194.2 35 | Sender: WWW 36 | Status: RO 37 | X-Status: A 38 | Content-Length: 340 39 | Lines: 11 40 | 41 | Quoting Tim Bunce : 42 | 43 | > I've CC'd Jochen as he needs to apply the PlRPC patches and make a 44 | > new release before I can depend on them being available. 45 | 46 | Done. Besides, Tim, I have no problems if you apply any changes. 47 | As we all know, it is very unlikely that I'll be actively developing 48 | the module in the future. 49 | 50 | 51 | Jochen 52 | 53 | -------------------------------------------------------------------------------- /err_shelved/err_dbtype.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perl5-dbi/dbi/b9cc7cca3d71b0ce5dfcb86d79c81764e0b24176/err_shelved/err_dbtype.msg -------------------------------------------------------------------------------- /err_shelved/ref_gotoxs.msg: -------------------------------------------------------------------------------- 1 | From timbo Tue Nov 30 00:26:25 1999 2 | Return-Path: 3 | Received: by toad.ig.co.uk (SMI-8.6/SMI-SVR4) 4 | id AAA17404; Tue, 30 Nov 1999 00:26:25 GMT 5 | Date: Tue, 30 Nov 1999 00:26:25 +0000 6 | From: Tim Bunce 7 | To: Tim Bunce 8 | Subject: driver calling goto kills application! 9 | Message-ID: <19991130002625.B17204@ig.co.uk> 10 | Mime-Version: 1.0 11 | Content-Type: text/plain; charset=us-ascii 12 | X-Mailer: Mutt 0.95.3i 13 | Content-Length: 139 14 | Lines: 9 15 | 16 | Adding this code: 17 | 18 | my $foo=0; 19 | LOOP: 20 | warn "LOOP"; 21 | goto LOOP unless ++$foo >= 2; 22 | 23 | causes the DBI to die when the driver method returns. 24 | 25 | 26 | -------------------------------------------------------------------------------- /err_shelved/ref_magicsv.txt: -------------------------------------------------------------------------------- 1 | From owner-perl5-porters@perl.org Fri Sep 11 18:27:22 1998 2 | Return-Path: 3 | Received: from oink by toad.ig.co.uk (SMI-8.6/SMI-SVR4) 4 | id SAA05819; Fri, 11 Sep 1998 18:27:22 +0100 5 | Received: from punt-21.mail.demon.net by oink with SMTP (PP) id <25814-0@oink>; 6 | Fri, 11 Sep 1998 18:27:00 +0100 7 | Received: from punt-2.mail.demon.net by mailstore for timbo@ig.co.uk 8 | id 905534226:20:04429:5; Fri, 11 Sep 98 17:17:06 GMT 9 | Received: from defender.perl.org ([209.45.167.243]) by punt-2.mail.demon.net 10 | id aa2004125; 11 Sep 98 17:16 GMT 11 | Received: (from majordomo@localhost) 12 | by defender.perl.org (8.8.8/8.8.8/Debian/GNU) id NAA06399 13 | for perl5-porters-outgoing; Fri, 11 Sep 1998 13:08:59 -0400 14 | X-Authentication-Warning: defender.perl.org: majordomo set sender to 15 | owner-perl5-porters@perl.org using -f 16 | Received: from ns2.brainstorm.net (root@ns2.brainstorm.net [205.164.112.3]) 17 | by defender.perl.org (8.8.8/8.8.8/Debian/GNU) with ESMTP id NAA06393 18 | for ; Fri, 11 Sep 1998 13:08:57 -0400 19 | Received: from wall.org (kiev.wall.org [205.178.11.135]) 20 | by ns2.brainstorm.net (8.8.8/8.6.9) with SMTP id KAA17751; 21 | Fri, 11 Sep 1998 10:08:43 -0700 (PDT) 22 | Received: by wall.org (SMI-8.6/SMI-SVR4) id KAA28168; 23 | Fri, 11 Sep 1998 10:06:48 -0700 24 | Date: Fri, 11 Sep 1998 10:06:48 -0700 25 | From: larry@wall.org (Larry Wall) 26 | Message-Id: <199809111706.KAA28168@wall.org> 27 | To: Joshua Pritikin 28 | Cc: gsar@engin.umich.edu, perl5-porters@perl.org 29 | Subject: Re: nice XS utility function 30 | In-Reply-To: (from Joshua Pritikin on Thu, 10 Sep 1998 16:57:22 -0400 (EDT)) 31 | Sender: owner-perl5-porters@perl.org 32 | Precedence: bulk 33 | X-Loop: Perl5-Porters 34 | Status: RO 35 | Content-Length: 562 36 | Lines: 15 37 | 38 | Joshua Pritikin writes: 39 | : On Thu, 10 Sep 1998 gsar@engin.umich.edu wrote: 40 | : > Looks like a candidate for perlguts, but shouldn't you check IOK to save 41 | : > some cycles? 42 | : 43 | : Like this? I still don't get the intent of private vs. public *OK macros. 44 | : Caching? 45 | 46 | When mg_get() fetches the magical value of a scalar, it has to put it 47 | somewhere. It puts it into the scalar itself, and sets the private 48 | flags to say what's actually there. Then subsequent code can examine 49 | the scalar multiple times without re-invoking magic. Look at sv_2iv() 50 | for an example. 51 | 52 | Larry 53 | 54 | -------------------------------------------------------------------------------- /ex/corogofer.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | use Time::HiRes qw(time); 6 | 7 | BEGIN { $ENV{PERL_ANYEVENT_STRICT} = 1; $ENV{PERL_ANYEVENT_VERBOSE} = 1; } 8 | 9 | use AnyEvent; 10 | 11 | BEGIN { $ENV{DBI_TRACE} = 0; $ENV{DBI_PUREPERL} = 0; $ENV{DBI_GOFER_TRACE} = 0; $ENV{DBD_GOFER_TRACE} = 0; }; 12 | 13 | use DBI; 14 | 15 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=corostream'; 16 | 17 | my $ticker = AnyEvent->timer( after => 0, interval => 0.1, cb => sub { 18 | warn sprintf "-tick- %.2f\n", time 19 | } ); 20 | 21 | warn "connecting...\n"; 22 | my $dbh = DBI->connect("dbi:NullP:"); 23 | warn "...connected\n"; 24 | 25 | for (1..5) { 26 | warn "entering DBI...\n"; 27 | $dbh->do("sleep 0.3"); # pseudo-sql understood by the DBD::NullP driver 28 | warn "...returned\n"; 29 | } 30 | 31 | warn "done."; 32 | 33 | -------------------------------------------------------------------------------- /ex/profile.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use DBI; 4 | 5 | $dbh = DBI->connect('dbi:SQLite:dbname=ex_profile.db', '', '', { RaiseError => 1 }); 6 | 7 | $dbh->do("DROP TABLE IF EXISTS ex_profile"); 8 | $dbh->do("CREATE TABLE ex_profile (a int)"); 9 | 10 | $dbh->do("INSERT INTO ex_profile (a) VALUES ($_)", undef) for 1..100; 11 | #$dbh->do("INSERT INTO ex_profile (a) VALUES (?)", undef, $_) for 1..100; 12 | 13 | my $select_sql = "SELECT a FROM ex_profile"; 14 | 15 | $dbh->selectall_arrayref($select_sql); 16 | 17 | $dbh->selectall_hashref($select_sql, 'a'); 18 | 19 | my $sth = $dbh->prepare($select_sql); 20 | $sth->execute; 21 | while ( @row = $sth->fetchrow_array ) { 22 | } 23 | 24 | 25 | __DATA__ 26 | -------------------------------------------------------------------------------- /lib/Bundle/DBI.pm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # -*- perl -*- 3 | 4 | package Bundle::DBI; 5 | 6 | use strict; 7 | use warnings; 8 | our $VERSION = "12.008696"; 9 | 10 | 1; 11 | 12 | __END__ 13 | 14 | =head1 NAME 15 | 16 | Bundle::DBI - A bundle to install DBI and required modules. 17 | 18 | =head1 SYNOPSIS 19 | 20 | perl -MCPAN -e 'install Bundle::DBI' 21 | 22 | =head1 CONTENTS 23 | 24 | DBI - for to get to know thyself 25 | 26 | DBI::Shell 11.91 - the DBI command line shell 27 | 28 | Storable 2.06 - for DBD::Proxy, DBI::ProxyServer, DBD::Forward 29 | 30 | Net::Daemon 0.37 - for DBD::Proxy and DBI::ProxyServer 31 | 32 | RPC::PlServer 0.2016 - for DBD::Proxy and DBI::ProxyServer 33 | 34 | DBD::Multiplex 1.19 - treat multiple db handles as one 35 | 36 | =head1 DESCRIPTION 37 | 38 | This bundle includes all the modules used by the Perl Database 39 | Interface (DBI) module, created by Tim Bunce. 40 | 41 | A I is a module that simply defines a collection of other 42 | modules. It is used by the L module to automate the fetching, 43 | building and installing of modules from the CPAN ftp archive sites. 44 | 45 | This bundle does not deal with the various database drivers (e.g. 46 | DBD::Informix, DBD::Oracle etc), most of which require software from 47 | sources other than CPAN. You'll need to fetch and build those drivers 48 | yourself. 49 | 50 | =head1 AUTHORS 51 | 52 | Jonathan Leffler, Jochen Wiedmann and Tim Bunce. 53 | 54 | =cut 55 | -------------------------------------------------------------------------------- /lib/DBD/Gofer.pm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perl5-dbi/dbi/b9cc7cca3d71b0ce5dfcb86d79c81764e0b24176/lib/DBD/Gofer.pm -------------------------------------------------------------------------------- /lib/DBD/Gofer/Policy/classic.pm: -------------------------------------------------------------------------------- 1 | package DBD::Gofer::Policy::classic; 2 | 3 | # $Id: classic.pm 10087 2007-10-16 12:42:37Z Tim $ 4 | # 5 | # Copyright (c) 2007, Tim Bunce, Ireland 6 | # 7 | # You may distribute under the terms of either the GNU General Public 8 | # License or the Artistic License, as specified in the Perl README file. 9 | 10 | use strict; 11 | use warnings; 12 | 13 | our $VERSION = "0.010088"; 14 | 15 | use base qw(DBD::Gofer::Policy::Base); 16 | 17 | __PACKAGE__->create_policy_subs({ 18 | 19 | # always use connect_cached on server 20 | connect_method => 'connect_cached', 21 | 22 | # use same methods on server as is called on client 23 | prepare_method => '', 24 | 25 | # don't skip the connect check since that also sets dbh attributes 26 | # although this makes connect more expensive, that's partly offset 27 | # by skip_ping=>1 below, which makes connect_cached very fast. 28 | skip_connect_check => 0, 29 | 30 | # most code doesn't rely on sth attributes being set after prepare 31 | skip_prepare_check => 1, 32 | 33 | # we're happy to use local method if that's the same as the remote 34 | skip_default_methods => 1, 35 | 36 | # ping is not important for DBD::Gofer and most transports 37 | skip_ping => 1, 38 | 39 | # only update dbh attributes on first contact with server 40 | dbh_attribute_update => 'first', 41 | 42 | # we'd like to set locally_* but can't because drivers differ 43 | 44 | # get_info results usually don't change 45 | cache_get_info => 1, 46 | }); 47 | 48 | 49 | 1; 50 | 51 | =head1 NAME 52 | 53 | DBD::Gofer::Policy::classic - The 'classic' policy for DBD::Gofer 54 | 55 | =head1 SYNOPSIS 56 | 57 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=classic", ...) 58 | 59 | The C policy is the default DBD::Gofer policy, so need not be included in the DSN. 60 | 61 | =head1 DESCRIPTION 62 | 63 | Temporary docs: See the source code for list of policies and their defaults. 64 | 65 | In a future version the policies and their defaults will be defined in the pod and parsed out at load-time. 66 | 67 | =head1 AUTHOR 68 | 69 | Tim Bunce, L 70 | 71 | =head1 LICENCE AND COPYRIGHT 72 | 73 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 74 | 75 | This module is free software; you can redistribute it and/or 76 | modify it under the same terms as Perl itself. See L. 77 | 78 | =cut 79 | 80 | -------------------------------------------------------------------------------- /lib/DBD/Gofer/Policy/pedantic.pm: -------------------------------------------------------------------------------- 1 | package DBD::Gofer::Policy::pedantic; 2 | 3 | # $Id: pedantic.pm 10087 2007-10-16 12:42:37Z Tim $ 4 | # 5 | # Copyright (c) 2007, Tim Bunce, Ireland 6 | # 7 | # You may distribute under the terms of either the GNU General Public 8 | # License or the Artistic License, as specified in the Perl README file. 9 | 10 | use strict; 11 | use warnings; 12 | 13 | our $VERSION = "0.010088"; 14 | 15 | use base qw(DBD::Gofer::Policy::Base); 16 | 17 | # the 'pedantic' policy is the same as the Base policy 18 | 19 | 1; 20 | 21 | =head1 NAME 22 | 23 | DBD::Gofer::Policy::pedantic - The 'pedantic' policy for DBD::Gofer 24 | 25 | =head1 SYNOPSIS 26 | 27 | $dbh = DBI->connect("dbi:Gofer:transport=...;policy=pedantic", ...) 28 | 29 | =head1 DESCRIPTION 30 | 31 | The C policy tries to be as transparent as possible. To do this it 32 | makes round-trips to the server for almost every DBI method call. 33 | 34 | This is the best policy to use when first testing existing code with Gofer. 35 | Once it's working well you should consider moving to the C policy or defining your own policy class. 36 | 37 | Temporary docs: See the source code for list of policies and their defaults. 38 | 39 | In a future version the policies and their defaults will be defined in the pod and parsed out at load-time. 40 | 41 | =head1 AUTHOR 42 | 43 | Tim Bunce, L 44 | 45 | =head1 LICENCE AND COPYRIGHT 46 | 47 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 48 | 49 | This module is free software; you can redistribute it and/or 50 | modify it under the same terms as Perl itself. See L. 51 | 52 | =cut 53 | 54 | -------------------------------------------------------------------------------- /lib/DBD/Multiplex/Logic/Default.pm: -------------------------------------------------------------------------------- 1 | package DBD::Multiplex::Logic::Default; 2 | 3 | use strict; 4 | use warnings; 5 | no strict 'refs'; 6 | 7 | sub mx_pick_handles { 8 | my ($parent_handle, $method, $wantarray, $mx_options, @args) = @_; 9 | 10 | my $parent_handle_list = $parent_handle->{'mx_handle_list'} or do { 11 | return if $method eq 'DESTROY'; # eg prepare() failed 12 | die "No mx_handle_list attribute when calling $method on $parent_handle"; 13 | }; 14 | 15 | my @child_handles = @$parent_handle_list; 16 | 17 | if (defined(my $mx_master_id = $parent_handle->{mx_master_id}) 18 | && DBD::Multiplex::mx_is_modify_statement( my $statement=$parent_handle->{Statement} ) 19 | ) { 20 | $parent_handle->trace_msg(" mx => $method on master only for $statement\n"); 21 | # Consider finding once and storing rather than finding each time. 22 | @child_handles = grep { $_->{dbd_mx_info}{mx_id} eq $mx_master_id } @child_handles 23 | or die "No handles match mx_master_id '$mx_master_id'"; 24 | 25 | } elsif ( DBD::Multiplex::mx_is_modify_statement( $statement=$parent_handle->{Statement} ) ){ 26 | # Deligate to 'write' capable servers 27 | @child_handles = grep { $_->{dbd_mx_info}{mx_type}->{W} == 1 } @child_handles 28 | or die "No 'write' capable handles"; 29 | } 30 | 31 | if ($parent_handle->{mx_shuffle} && @child_handles > 1) { 32 | my $deck = \@child_handles; # ref for in-place shuffle 33 | my $i = @$deck; 34 | while (--$i) { 35 | my $j = int rand ($i+1); 36 | @$deck[$i,$j] = @$deck[$j,$i]; 37 | } 38 | } 39 | 40 | return @child_handles; 41 | } 42 | 43 | 1; 44 | -------------------------------------------------------------------------------- /lib/DBI/Const/GetInfoType.pm: -------------------------------------------------------------------------------- 1 | # $Id: GetInfoType.pm 8696 2007-01-24 23:12:38Z Tim $ 2 | # 3 | # Copyright (c) 2002 Tim Bunce Ireland 4 | # 5 | # Constant data describing info type codes for the DBI getinfo function. 6 | # 7 | # You may distribute under the terms of either the GNU General Public 8 | # License or the Artistic License, as specified in the Perl README file. 9 | 10 | package DBI::Const::GetInfoType; 11 | 12 | use strict; 13 | use warnings; 14 | 15 | use Exporter (); 16 | 17 | our @ISA = qw(Exporter); 18 | our @EXPORT = qw(%GetInfoType); 19 | 20 | my 21 | $VERSION = "2.008697"; 22 | 23 | =head1 NAME 24 | 25 | DBI::Const::GetInfoType - Data describing GetInfo type codes 26 | 27 | =head1 SYNOPSIS 28 | 29 | use DBI::Const::GetInfoType; 30 | 31 | =head1 DESCRIPTION 32 | 33 | Imports a %GetInfoType hash which maps names for GetInfo Type Codes 34 | into their corresponding numeric values. For example: 35 | 36 | $database_version = $dbh->get_info( $GetInfoType{SQL_DBMS_VER} ); 37 | 38 | The interface to this module is new and nothing beyond what is 39 | written here is guaranteed. 40 | 41 | =cut 42 | 43 | use DBI::Const::GetInfo::ANSI (); # liable to change 44 | use DBI::Const::GetInfo::ODBC (); # liable to change 45 | 46 | our %GetInfoType = 47 | ( 48 | %DBI::Const::GetInfo::ANSI::InfoTypes # liable to change 49 | , %DBI::Const::GetInfo::ODBC::InfoTypes # liable to change 50 | ); 51 | 52 | 1; 53 | -------------------------------------------------------------------------------- /lib/DBI/Gofer/Serializer/Base.pm: -------------------------------------------------------------------------------- 1 | package DBI::Gofer::Serializer::Base; 2 | 3 | # $Id: Base.pm 9949 2007-09-18 09:38:15Z Tim $ 4 | # 5 | # Copyright (c) 2007, Tim Bunce, Ireland 6 | # 7 | # You may distribute under the terms of either the GNU General Public 8 | # License or the Artistic License, as specified in the Perl README file. 9 | 10 | =head1 NAME 11 | 12 | DBI::Gofer::Serializer::Base - base class for Gofer serialization 13 | 14 | =head1 SYNOPSIS 15 | 16 | $serializer = $serializer_class->new(); 17 | 18 | $string = $serializer->serialize( $data ); 19 | ($string, $deserializer_class) = $serializer->serialize( $data ); 20 | 21 | $data = $serializer->deserialize( $string ); 22 | 23 | =head1 DESCRIPTION 24 | 25 | DBI::Gofer::Serializer::* classes implement a very minimal subset of the L API. 26 | 27 | Gofer serializers are expected to be very fast and are not required to deal 28 | with anything other than non-blessed references to arrays and hashes, and plain scalars. 29 | 30 | =cut 31 | 32 | 33 | use strict; 34 | use warnings; 35 | 36 | use Carp qw(croak); 37 | 38 | our $VERSION = "0.009950"; 39 | 40 | 41 | sub new { 42 | my $class = shift; 43 | my $deserializer_class = $class->deserializer_class; 44 | return bless { deserializer_class => $deserializer_class } => $class; 45 | } 46 | 47 | sub deserializer_class { 48 | my $self = shift; 49 | my $class = ref($self) || $self; 50 | $class =~ s/^DBI::Gofer::Serializer:://; 51 | return $class; 52 | } 53 | 54 | sub serialize { 55 | my $self = shift; 56 | croak ref($self)." has not implemented the serialize method"; 57 | } 58 | 59 | sub deserialize { 60 | my $self = shift; 61 | croak ref($self)." has not implemented the deserialize method"; 62 | } 63 | 64 | 1; 65 | -------------------------------------------------------------------------------- /lib/DBI/Gofer/Serializer/DataDumper.pm: -------------------------------------------------------------------------------- 1 | package DBI::Gofer::Serializer::DataDumper; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | our $VERSION = "0.009950"; 7 | 8 | # $Id: DataDumper.pm 9949 2007-09-18 09:38:15Z Tim $ 9 | # 10 | # Copyright (c) 2007, Tim Bunce, Ireland 11 | # 12 | # You may distribute under the terms of either the GNU General Public 13 | # License or the Artistic License, as specified in the Perl README file. 14 | 15 | =head1 NAME 16 | 17 | DBI::Gofer::Serializer::DataDumper - Gofer serialization using DataDumper 18 | 19 | =head1 SYNOPSIS 20 | 21 | $serializer = DBI::Gofer::Serializer::DataDumper->new(); 22 | 23 | $string = $serializer->serialize( $data ); 24 | 25 | =head1 DESCRIPTION 26 | 27 | Uses DataDumper to serialize. Deserialization is not supported. 28 | The output of this class is only meant for human consumption. 29 | 30 | See also L. 31 | 32 | =cut 33 | 34 | use Data::Dumper; 35 | 36 | use base qw(DBI::Gofer::Serializer::Base); 37 | 38 | 39 | sub serialize { 40 | my $self = shift; 41 | local $Data::Dumper::Indent = 1; 42 | local $Data::Dumper::Terse = 1; 43 | local $Data::Dumper::Useqq = 0; # enabling this disables xs 44 | local $Data::Dumper::Sortkeys = 1; 45 | local $Data::Dumper::Quotekeys = 0; 46 | local $Data::Dumper::Deparse = 0; 47 | local $Data::Dumper::Purity = 0; 48 | my $frozen = Data::Dumper::Dumper(shift); 49 | return $frozen unless wantarray; 50 | return ($frozen, $self->{deserializer_class}); 51 | } 52 | 53 | 1; 54 | -------------------------------------------------------------------------------- /lib/DBI/Gofer/Serializer/Storable.pm: -------------------------------------------------------------------------------- 1 | package DBI::Gofer::Serializer::Storable; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use base qw(DBI::Gofer::Serializer::Base); 7 | 8 | # $Id: Storable.pm 15585 2013-03-22 20:31:22Z Tim $ 9 | # 10 | # Copyright (c) 2007, Tim Bunce, Ireland 11 | # 12 | # You may distribute under the terms of either the GNU General Public 13 | # License or the Artistic License, as specified in the Perl README file. 14 | 15 | =head1 NAME 16 | 17 | DBI::Gofer::Serializer::Storable - Gofer serialization using Storable 18 | 19 | =head1 SYNOPSIS 20 | 21 | $serializer = DBI::Gofer::Serializer::Storable->new(); 22 | 23 | $string = $serializer->serialize( $data ); 24 | ($string, $deserializer_class) = $serializer->serialize( $data ); 25 | 26 | $data = $serializer->deserialize( $string ); 27 | 28 | =head1 DESCRIPTION 29 | 30 | Uses Storable::nfreeze() to serialize and Storable::thaw() to deserialize. 31 | 32 | The serialize() method sets local $Storable::forgive_me = 1; so it doesn't 33 | croak if it encounters any data types that can't be serialized, such as code refs. 34 | 35 | See also L. 36 | 37 | =cut 38 | 39 | use Storable qw(nfreeze thaw); 40 | 41 | our $VERSION = "0.015586"; 42 | 43 | use base qw(DBI::Gofer::Serializer::Base); 44 | 45 | 46 | sub serialize { 47 | my $self = shift; 48 | local $Storable::forgive_me = 1; # for CODE refs etc 49 | local $Storable::canonical = 1; # for go_cache 50 | my $frozen = nfreeze(shift); 51 | return $frozen unless wantarray; 52 | return ($frozen, $self->{deserializer_class}); 53 | } 54 | 55 | sub deserialize { 56 | my $self = shift; 57 | return thaw(shift); 58 | } 59 | 60 | 1; 61 | -------------------------------------------------------------------------------- /lib/DBI/Gofer/Transport/pipeone.pm: -------------------------------------------------------------------------------- 1 | package DBI::Gofer::Transport::pipeone; 2 | 3 | # $Id: pipeone.pm 12536 2009-02-24 22:37:09Z Tim $ 4 | # 5 | # Copyright (c) 2007, Tim Bunce, Ireland 6 | # 7 | # You may distribute under the terms of either the GNU General Public 8 | # License or the Artistic License, as specified in the Perl README file. 9 | 10 | use strict; 11 | use warnings; 12 | 13 | use DBI::Gofer::Execute; 14 | 15 | use base qw(DBI::Gofer::Transport::Base Exporter); 16 | 17 | our $VERSION = "0.012537"; 18 | 19 | our @EXPORT = qw(run_one_stdio); 20 | 21 | my $executor = DBI::Gofer::Execute->new(); 22 | 23 | sub run_one_stdio { 24 | 25 | binmode STDIN; 26 | binmode STDOUT; 27 | 28 | my $transport = DBI::Gofer::Transport::pipeone->new(); 29 | 30 | my $frozen_request = do { local $/; }; 31 | 32 | my $response = $executor->execute_request( $transport->thaw_request($frozen_request) ); 33 | 34 | my $frozen_response = $transport->freeze_response($response); 35 | 36 | print $frozen_response; 37 | 38 | # no point calling $executor->update_stats(...) for pipeONE 39 | } 40 | 41 | 1; 42 | __END__ 43 | 44 | =head1 NAME 45 | 46 | DBI::Gofer::Transport::pipeone - DBD::Gofer server-side transport for pipeone 47 | 48 | =head1 SYNOPSIS 49 | 50 | See L. 51 | 52 | =head1 AUTHOR 53 | 54 | Tim Bunce, L 55 | 56 | =head1 LICENCE AND COPYRIGHT 57 | 58 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 59 | 60 | This module is free software; you can redistribute it and/or 61 | modify it under the same terms as Perl itself. See L. 62 | 63 | =cut 64 | 65 | -------------------------------------------------------------------------------- /lib/DBI/Gofer/Transport/stream.pm: -------------------------------------------------------------------------------- 1 | package DBI::Gofer::Transport::stream; 2 | 3 | # $Id: stream.pm 12536 2009-02-24 22:37:09Z Tim $ 4 | # 5 | # Copyright (c) 2007, Tim Bunce, Ireland 6 | # 7 | # You may distribute under the terms of either the GNU General Public 8 | # License or the Artistic License, as specified in the Perl README file. 9 | 10 | use strict; 11 | use warnings; 12 | 13 | use DBI qw(dbi_time); 14 | use DBI::Gofer::Execute; 15 | 16 | use base qw(DBI::Gofer::Transport::pipeone Exporter); 17 | 18 | our $VERSION = "0.012537"; 19 | 20 | our @EXPORT = qw(run_stdio_hex); 21 | 22 | my $executor = DBI::Gofer::Execute->new(); 23 | 24 | sub run_stdio_hex { 25 | 26 | my $transport = DBI::Gofer::Transport::stream->new(); 27 | local $| = 1; 28 | 29 | DBI->trace_msg("$0 started (pid $$)\n"); 30 | 31 | local $\; # OUTPUT_RECORD_SEPARATOR 32 | local $/ = "\012"; # INPUT_RECORD_SEPARATOR 33 | while ( defined( my $encoded_request = ) ) { 34 | my $time_received = dbi_time(); 35 | $encoded_request =~ s/\015?\012$//; 36 | 37 | my $frozen_request = pack "H*", $encoded_request; 38 | my $request = $transport->thaw_request( $frozen_request ); 39 | 40 | my $response = $executor->execute_request( $request ); 41 | 42 | my $frozen_response = $transport->freeze_response($response); 43 | my $encoded_response = unpack "H*", $frozen_response; 44 | 45 | print $encoded_response, "\015\012"; # autoflushed due to $|=1 46 | 47 | # there's no way to access the stats currently 48 | # so this just serves as a basic test and illustration of update_stats() 49 | $executor->update_stats($request, $response, $frozen_request, $frozen_response, $time_received, 1); 50 | } 51 | DBI->trace_msg("$0 ending (pid $$)\n"); 52 | } 53 | 54 | 1; 55 | __END__ 56 | 57 | =head1 NAME 58 | 59 | DBI::Gofer::Transport::stream - DBD::Gofer server-side transport for stream 60 | 61 | =head1 SYNOPSIS 62 | 63 | See L. 64 | 65 | =head1 AUTHOR 66 | 67 | Tim Bunce, L 68 | 69 | =head1 LICENCE AND COPYRIGHT 70 | 71 | Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. 72 | 73 | This module is free software; you can redistribute it and/or 74 | modify it under the same terms as Perl itself. See L. 75 | 76 | =cut 77 | -------------------------------------------------------------------------------- /lib/DBI/ProfileSubs.pm: -------------------------------------------------------------------------------- 1 | package DBI::ProfileSubs; 2 | 3 | our $VERSION = "0.009396"; 4 | 5 | =head1 NAME 6 | 7 | DBI::ProfileSubs - Subroutines for dynamic profile Path 8 | 9 | =head1 SYNOPSIS 10 | 11 | DBI_PROFILE='&norm_std_n3' prog.pl 12 | 13 | This is new and still experimental. 14 | 15 | =head1 TO DO 16 | 17 | Define come kind of naming convention for the subs. 18 | 19 | =cut 20 | 21 | use strict; 22 | use warnings; 23 | 24 | 25 | # would be good to refactor these regex into separate subs and find some 26 | # way to compose them in various combinations into multiple subs. 27 | # Perhaps via AUTOLOAD where \&auto_X_Y_Z creates a sub that does X, Y, and Z. 28 | # The final subs always need to be very fast. 29 | # 30 | 31 | sub norm_std_n3 { 32 | # my ($h, $method_name) = @_; 33 | local $_ = $_; 34 | 35 | s/\b\d+\b//g; # 42 -> 36 | s/\b0x[0-9A-Fa-f]+\b//g; # 0xFE -> 37 | 38 | s/'.*?'/''/g; # single quoted strings (doesn't handle escapes) 39 | s/".*?"/""/g; # double quoted strings (doesn't handle escapes) 40 | 41 | # convert names like log20001231 into log 42 | s/([a-z_]+)(\d{3,})\b/${1}/ig; 43 | 44 | # abbreviate massive "in (...)" statements and similar 45 | s!((\s*<[NS]>\s*,\s*){100,})!sprintf("$2,",length($1)/2)!eg; 46 | 47 | return $_; 48 | } 49 | 50 | 1; 51 | -------------------------------------------------------------------------------- /lib/DBI/Util/_accessor.pm: -------------------------------------------------------------------------------- 1 | package DBI::Util::_accessor; 2 | use strict; 3 | use warnings; 4 | use Carp; 5 | our $VERSION = "0.009479"; 6 | 7 | # inspired by Class::Accessor::Fast 8 | 9 | sub new { 10 | my($proto, $fields) = @_; 11 | my($class) = ref $proto || $proto; 12 | $fields ||= {}; 13 | 14 | my @dubious = grep { !m/^_/ && !$proto->can($_) } keys %$fields; 15 | carp "$class doesn't have accessors for fields: @dubious" if @dubious; 16 | 17 | # make a (shallow) copy of $fields. 18 | bless {%$fields}, $class; 19 | } 20 | 21 | sub mk_accessors { 22 | my($self, @fields) = @_; 23 | $self->mk_accessors_using('make_accessor', @fields); 24 | } 25 | 26 | sub mk_accessors_using { 27 | my($self, $maker, @fields) = @_; 28 | my $class = ref $self || $self; 29 | 30 | # So we don't have to do lots of lookups inside the loop. 31 | $maker = $self->can($maker) unless ref $maker; 32 | 33 | no strict 'refs'; 34 | foreach my $field (@fields) { 35 | my $accessor = $self->$maker($field); 36 | *{$class."\:\:$field"} = $accessor 37 | unless defined &{$class."\:\:$field"}; 38 | } 39 | #my $hash_ref = \%{$class."\:\:_accessors_hash}; 40 | #$hash_ref->{$_}++ for @fields; 41 | # XXX also copy down _accessors_hash of base class(es) 42 | # so one in this class is complete 43 | return; 44 | } 45 | 46 | sub make_accessor { 47 | my($class, $field) = @_; 48 | return sub { 49 | my $self = shift; 50 | return $self->{$field} unless @_; 51 | croak "Too many arguments to $field" if @_ > 1; 52 | return $self->{$field} = shift; 53 | }; 54 | } 55 | 56 | sub make_accessor_autoviv_hashref { 57 | my($class, $field) = @_; 58 | return sub { 59 | my $self = shift; 60 | return $self->{$field} ||= {} unless @_; 61 | croak "Too many arguments to $field" if @_ > 1; 62 | return $self->{$field} = shift; 63 | }; 64 | } 65 | 66 | 1; 67 | -------------------------------------------------------------------------------- /sandbox/dumpmethods.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | package DBI; 4 | 5 | use strict; 6 | use warnings; 7 | 8 | 9 | BEGIN { $ENV{DBI_PUREPERL} = 2 } 10 | use DBI; 11 | use Data::Dumper; 12 | 13 | no strict qw(subs refs); # build name and code to value mappings introspectively 14 | my @ima_n = grep { m/^IMA_.*/ } keys %{"DBI::"}; 15 | warn "@ima_n"; 16 | my %ima_n2v = map { m/^(IMA_.*)/ ? ($1 => &$_) : () } @ima_n; 17 | warn Dumper \%ima_n2v; 18 | my %ima_v2n = reverse %ima_n2v; 19 | 20 | my @bit2hex_bitkeys = map { 1 << $_ } 0 .. 31; 21 | my @bit2hex_bitvals = 22 | map { sprintf "%s", $ima_v2n{$_} || "" } @bit2hex_bitkeys; 23 | my %bit2hex; 24 | @bit2hex{@bit2hex_bitkeys} = @bit2hex_bitvals; 25 | my @bit2hex_values = ("0x00000000", @bit2hex_bitvals); 26 | 27 | #warn Dumper \%DBI::DBI_methods; 28 | for (0 .. 31) { 29 | my $bit = 1 << $_; 30 | my @ima_flags = map { ($bit & $_) ? $bit2hex{$_} : () } @bit2hex_bitkeys; 31 | printf "%20s => %04x\n", "@ima_flags", $bit; 32 | } 33 | 34 | while (my ($class, $meths) = each %DBI::DBI_methods) { 35 | 36 | for my $method (sort keys %$meths) { 37 | my $info = $meths->{$method}; 38 | my $fullmeth = "DBI::${class}::$method"; 39 | 40 | my $proto = $info->{U}[2]; 41 | unless (defined $proto) { 42 | $proto = '$' x ($info->{U}[0] || 0); 43 | $proto .= ";" . ('$' x $info->{U}[1]) if $info->{U}[1]; 44 | } 45 | 46 | my $O = $info->{O} || 0; 47 | my @ima_flags = map { ($O & $_) ? $bit2hex{$_} : () } @bit2hex_bitkeys; 48 | 49 | printf "\$h->%s (%s) %s # 0x%04x\n", $fullmeth, $proto, "@ima_flags", $O; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /t-mock/DBI/Test/Case/DBI/attributes/CachedKids.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Test::More; 4 | 5 | plan skip_all => 'TODO: Currently not implemented. Must write test for connect_cached and prepare_cached also'; 6 | 7 | -------------------------------------------------------------------------------- /t-mock/DBI/Test/Case/DBI/attributes/Executed.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Test::More; 4 | 5 | our @DB_CREDS = ('dbi:SQLite::memory:', undef, undef, { AutoCommit => 0}); 6 | my %SQLS = ( 7 | 'SELECT' => 'SELECT 1+1', 8 | 'INSERT' => undef 9 | ); 10 | 11 | { #Check that calling execute on a statementhandler sets Executed to true on both the sth and the parent dbh 12 | 13 | my $dbh = DBI->connect( @DB_CREDS[0..2], {} ); 14 | isa_ok($dbh, 'DBI::db'); 15 | 16 | my $sth = $dbh->prepare($SQLS{INSERT}); 17 | 18 | isa_ok($sth, 'DBI::st'); 19 | 20 | ok($sth->execute(), 'execute'); 21 | 22 | ok($sth->{Executed}, '$sth->{Executed} is true after execute() call'); 23 | ok($sth->FETCH('Executed'), '$sth->FETCH(Executed) is true after execute() call'); 24 | 25 | ok($dbh->{Executed}, '$dbh->{Executed} is true after execute() call'); 26 | ok($dbh->FETCH('Executed'), '$dbh->FETCH(Executed) is true after execute() call'); 27 | } 28 | 29 | { #Check that the Executed flag is cleared on the database handle when a commit\rollback is issued 30 | 31 | foreach my $method ( qw(commit rollback) ){ 32 | my $dbh = DBI->connect( @DB_CREDS[0..2], { AutoCommit => 0} ); 33 | isa_ok($dbh, 'DBI::db'); 34 | 35 | my $sth = $dbh->prepare($SQLS{INSERT}); 36 | isa_ok($sth, 'DBI::st'); 37 | 38 | ok($sth->execute(), 'execute'); 39 | 40 | ok($sth->{Executed}, '$sth->{Executed} is true after execute() call'); 41 | ok($sth->FETCH('Executed'), '$sth->FETCH(Executed) is true after execute() call'); 42 | 43 | ok($dbh->{Executed}, '$dbh->{Executed} is true after execute() call'); 44 | ok($dbh->FETCH('Executed'), '$dbh->FETCH(Executed) is true after execute() call'); 45 | 46 | ok($dbh->$method(), $method); 47 | 48 | #The Executed flag of the dbh should now be cleared by the commit or rollback call 49 | ok(!$dbh->{Executed}, '$dbh->{Executed} is false after ' . $method . ' call'); 50 | ok(!$dbh->FETCH('Executed'), '!$dbh->FETCH(Executed) is false after ' . $method . ' call'); 51 | } 52 | } 53 | done_testing(); -------------------------------------------------------------------------------- /t-mock/DBI/Test/Case/DBI/attributes/Type.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Test::More; 4 | 5 | our @DB_CREDS = ('dbi:SQLite::memory:', undef, undef, { AutoCommit => 0}); 6 | my %SQLS = ( 7 | 'SELECT' => 'SELECT 1+1', 8 | 'INSERT' => undef 9 | ); 10 | 11 | { #Check that the driver object returns the correct type 12 | #Extracting the drivername from the dsn. We need to drivername to check that the driver returns the right type 13 | my $driver_name; 14 | ($driver_name = $DB_CREDS[0]) =~ s/dbi:([A-Za-z0-9_\-]+)::.+/$1/; 15 | 16 | #We must force DBI to load the driver in order for it to be visible in the installed_drivers hash 17 | #installed_drivers only list loaded drivers from a DBI perspective, not from a perl perspective. 18 | #Hence 'use DBD::somedriver' is not loaded from a internal DBI perspective 19 | my $dbh = DBI->connect( @DB_CREDS[0..2], {} ); 20 | 21 | my %drivers = DBI->installed_drivers(); 22 | 23 | my $driver = $drivers{$driver_name}; 24 | isa_ok($driver, 'DBI::dr'); 25 | 26 | cmp_ok($driver->{Type}, 'eq', 'dr', 'driver->{Type} eq dr'); 27 | cmp_ok($driver->FETCH('Type'), 'eq', 'dr', 'driver->FETCH(Type) eq dr'); 28 | } 29 | { #Check that the database handle returns the correct type 30 | my $dbh = DBI->connect( @DB_CREDS[0..2], {} ); 31 | isa_ok($dbh, 'DBI::db'); 32 | cmp_ok($dbh->{Type}, 'eq', 'db', 'dbh->{Type} eq db'); 33 | cmp_ok($dbh->FETCH('Type'), 'eq', 'db', 'dbh->FETCH(Type) eq db'); 34 | } 35 | { #Check that the statementhandler returns the correct type 36 | my $dbh = DBI->connect( @DB_CREDS[0..2], {} ); 37 | isa_ok($dbh, 'DBI::db'); 38 | 39 | my $sth = $dbh->prepare($SQLS{SELECT}); 40 | isa_ok($sth, 'DBI::st'); 41 | 42 | cmp_ok($sth->{Type}, 'eq', 'st', 'sth->{Type} eq st'); 43 | cmp_ok($sth->FETCH('Type'), 'eq', 'st', 'sth->FETCH(Type) eq st'); 44 | } 45 | done_testing(); -------------------------------------------------------------------------------- /t-mock/DBI/Test/DBI/Case.pm: -------------------------------------------------------------------------------- 1 | package DBI::Test::DBI::Case; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use parent qw(DBI::Test::Case); 7 | 8 | use Carp qw(carp); 9 | 10 | use DBI::Mock (); 11 | 12 | # default filter applies to PROVIDED_DBDS - modify if we want test more 13 | # sub filter_drivers 14 | 15 | # should be enabled by test, if wanted 16 | # sub requires_extended { 0 } 17 | 18 | sub supported_variant 19 | { 20 | my ( $self, $test_case, $cfg_pfx, $test_confs, $dsn_pfx, $dsn_cred, $options ) = @_; 21 | 22 | # don't re-run tests for DBI::Mock 23 | $self->is_test_for_mocked($test_confs) and return; 24 | 25 | return 1; 26 | } 27 | 28 | 1; 29 | -------------------------------------------------------------------------------- /t-mock/DBI/Test/DBI/Conf.pm: -------------------------------------------------------------------------------- 1 | package DBI::Test::DBI::Conf; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use parent qw(DBI::Test::Conf); 7 | 8 | BEGIN 9 | { 10 | eval { require SQL::Statement; }; 11 | } 12 | 13 | my %setup = ( 14 | pureperl => { 15 | name => "DBI::PurePerl", 16 | category => "dbi", 17 | cat_abbrev => "z", 18 | abbrev => "p", 19 | init_stub => [ '$ENV{DBI_PUREPERL} = 2', ], 20 | cleanup_stub => ['delete $ENV{DBI_PUREPERL};'], 21 | }, 22 | gofer => { 23 | name => "DBD::Gofer", 24 | category => "dbi", 25 | cat_abbrev => "z", 26 | abbrev => "g", 27 | init_stub => [ q{$ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'}, ], 28 | cleanup_stub => [q|delete $ENV{DBI_AUTOPROXY};|], 29 | }, 30 | ( 31 | ( defined( $INC{'SQL/Statement.pm'} ) and -f $INC{'SQL/Statement.pm'} ) 32 | ? ( 33 | nano => { 34 | name => "DBI::SQL::Nano", 35 | category => "dbi", 36 | cat_abbrev => "z", 37 | abbrev => "n", 38 | init_stub => [ q{$ENV{DBI_SQL_NANO} = 1}, ], 39 | cleanup_stub => [q|delete $ENV{DBI_SQL_NANO};|], 40 | }, 41 | ) 42 | : () 43 | ), 44 | ); 45 | 46 | sub conf 47 | { 48 | %setup; 49 | } 50 | 51 | 1; 52 | -------------------------------------------------------------------------------- /t-mock/DBI/Test/DBI/List.pm: -------------------------------------------------------------------------------- 1 | package DBI::Test::DBI::List; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use parent qw(DBI::Test::List); 7 | 8 | sub test_cases 9 | { 10 | return map { "DBI::" . $_ } qw( 11 | simple::sql_engine 12 | simple::file 13 | simple::dbm 14 | ); 15 | } 16 | 17 | 1; 18 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::dbm; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 11 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::file; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 11 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use lib "."; 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::dbm; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 11 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::dbm; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 11 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::dbm; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 11 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::dbm; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 11 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::file; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 11 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::DBI::simple::sql_engine; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 11 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::file; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::file; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvg_sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::sql_engine; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::file; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::file; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvgn_sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::sql_engine; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::file; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::file; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvn_sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::sql_engine; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::file; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::dbm; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 17 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::file; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvp_sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::DBI::simple::sql_engine; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::file; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::file; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpg_sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::sql_engine; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::dbm; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 21 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::file; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 21 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::dbm; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 21 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::dbm; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 21 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::dbm; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 21 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::dbm; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 21 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::file; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 21 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpgn_sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::DBI::simple::sql_engine; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 21 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_dvd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_dvd_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::file; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_dvds_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_dvdsd_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Data::Dumper',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_dvdsf_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'FreezeThaw',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_dvdss_dbm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::dbm; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::dbm", ['dbi:DBM:',undef,undef,{dbm_mldbm => 'Storable',dbm_type => 'SDBM_File'}]); 19 | DBI::Test::Case::DBI::simple::dbm->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_dvf_file.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::file; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::file", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::file->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/DBI/simple/zvpn_sql_engine.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::DBI::simple::sql_engine; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::DBI::simple::sql_engine", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::DBI::simple::sql_engine->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/dvc_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::SQL::Statement::error; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:CSV:',undef,undef,{}]); 11 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/dvd_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::SQL::Statement::error; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:DBM:',undef,undef,{}]); 11 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/dvf_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::SQL::Statement::error; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:File:',undef,undef,{}]); 11 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/mvb_dvn_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_MOCK} = 1; 5 | } 6 | 7 | 8 | use DBI::Mock; 9 | use DBI::Test::DSN::Provider; 10 | 11 | use DBI::Test::Case::SQL::Statement::error; 12 | 13 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:NullP:',undef,undef,{}]); 14 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 15 | 16 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/zvp_dvc_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::SQL::Statement::error; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:CSV:',undef,undef,{}]); 17 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/zvp_dvd_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::SQL::Statement::error; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/zvp_dvf_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::SQL::Statement::error; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/zvp_mvb_dvc_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::SQL::Statement::error; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:CSV:',undef,undef,{}]); 18 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/zvp_mvb_dvd_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::SQL::Statement::error; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:DBM:',undef,undef,{}]); 18 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/zvp_mvb_dvf_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::SQL::Statement::error; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:File:',undef,undef,{}]); 18 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/SQL/Statement/zvp_mvb_dvn_error.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::SQL::Statement::error; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::SQL::Statement::error", ['dbi:NullP:',undef,undef,{}]); 18 | DBI::Test::Case::SQL::Statement::error->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/basic/dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::connect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 11 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::disconnect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 11 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::connect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 11 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::disconnect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 11 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::connect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 11 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::disconnect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 11 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::connect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 11 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | 5 | use DBI::Mock; 6 | use DBI::Test::DSN::Provider; 7 | 8 | use DBI::Test::Case::basic::disconnect; 9 | 10 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 11 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 12 | 13 | -------------------------------------------------------------------------------- /t-mock/basic/mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_MOCK} = 1; 5 | } 6 | 7 | 8 | use DBI::Mock; 9 | use DBI::Test::DSN::Provider; 10 | 11 | use DBI::Test::Case::basic::connect; 12 | 13 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 14 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 15 | 16 | -------------------------------------------------------------------------------- /t-mock/basic/mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_MOCK} = 1; 5 | } 6 | 7 | 8 | use DBI::Mock; 9 | use DBI::Test::DSN::Provider; 10 | 11 | use DBI::Test::Case::basic::disconnect; 12 | 13 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 14 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 15 | 16 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_AUTOPROXY}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::basic::connect; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 18 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/basic/zvg_mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::basic::disconnect; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 18 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_AUTOPROXY};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1; 6 | $ENV{DBI_MOCK} = 1; 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_AUTOPROXY};; 11 | delete $ENV{DBI_SQL_NANO}; 12 | } 13 | 14 | use DBI::Mock; 15 | use DBI::Test::DSN::Provider; 16 | 17 | use DBI::Test::Case::basic::connect; 18 | 19 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 20 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 21 | 22 | -------------------------------------------------------------------------------- /t-mock/basic/zvgn_mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 5 | $ENV{DBI_SQL_NANO} = 1; 6 | $ENV{DBI_MOCK} = 1; 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_AUTOPROXY};; 11 | delete $ENV{DBI_SQL_NANO}; 12 | } 13 | 14 | use DBI::Mock; 15 | use DBI::Test::DSN::Provider; 16 | 17 | use DBI::Test::Case::basic::disconnect; 18 | 19 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 20 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 21 | 22 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_SQL_NANO}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_SQL_NANO}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::basic::connect; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 18 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/basic/zvn_mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_SQL_NANO} = 1; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_SQL_NANO}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::basic::disconnect; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 18 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::connect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2 5 | } 6 | 7 | END { 8 | delete $ENV{DBI_PUREPERL}; 9 | } 10 | 11 | use DBI::Mock; 12 | use DBI::Test::DSN::Provider; 13 | 14 | use DBI::Test::Case::basic::disconnect; 15 | 16 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 17 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 18 | 19 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::basic::connect; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 18 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/basic/zvp_mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_MOCK} = 1; 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL}; 10 | } 11 | 12 | use DBI::Mock; 13 | use DBI::Test::DSN::Provider; 14 | 15 | use DBI::Test::Case::basic::disconnect; 16 | 17 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 18 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 19 | 20 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic' 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_AUTOPROXY}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_MOCK} = 1; 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY}; 12 | } 13 | 14 | use DBI::Mock; 15 | use DBI::Test::DSN::Provider; 16 | 17 | use DBI::Test::Case::basic::connect; 18 | 19 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 20 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 21 | 22 | -------------------------------------------------------------------------------- /t-mock/basic/zvpg_mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_MOCK} = 1; 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY}; 12 | } 13 | 14 | use DBI::Mock; 15 | use DBI::Test::DSN::Provider; 16 | 17 | use DBI::Test::Case::basic::disconnect; 18 | 19 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 20 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 21 | 22 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::connect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 21 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::disconnect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 21 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::connect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 21 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::disconnect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 21 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::connect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 21 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::disconnect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 21 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::connect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 21 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_AUTOPROXY};; 12 | delete $ENV{DBI_SQL_NANO}; 13 | } 14 | 15 | use DBI::Mock; 16 | use DBI::Test::DSN::Provider; 17 | 18 | use DBI::Test::Case::basic::disconnect; 19 | 20 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 21 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 22 | 23 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1; 7 | $ENV{DBI_MOCK} = 1; 8 | } 9 | 10 | END { 11 | delete $ENV{DBI_PUREPERL};; 12 | delete $ENV{DBI_AUTOPROXY};; 13 | delete $ENV{DBI_SQL_NANO}; 14 | } 15 | 16 | use DBI::Mock; 17 | use DBI::Test::DSN::Provider; 18 | 19 | use DBI::Test::Case::basic::connect; 20 | 21 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 22 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 23 | 24 | -------------------------------------------------------------------------------- /t-mock/basic/zvpgn_mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_AUTOPROXY} = 'dbi:Gofer:transport=null;policy=pedantic'; 6 | $ENV{DBI_SQL_NANO} = 1; 7 | $ENV{DBI_MOCK} = 1; 8 | } 9 | 10 | END { 11 | delete $ENV{DBI_PUREPERL};; 12 | delete $ENV{DBI_AUTOPROXY};; 13 | delete $ENV{DBI_SQL_NANO}; 14 | } 15 | 16 | use DBI::Mock; 17 | use DBI::Test::DSN::Provider; 18 | 19 | use DBI::Test::Case::basic::disconnect; 20 | 21 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 22 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 23 | 24 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dvd_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dvd_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:DBM:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dve_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:ExampleP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dve_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:ExampleP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dvf_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dvf_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:File:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::connect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1 6 | } 7 | 8 | END { 9 | delete $ENV{DBI_PUREPERL};; 10 | delete $ENV{DBI_SQL_NANO}; 11 | } 12 | 13 | use DBI::Mock; 14 | use DBI::Test::DSN::Provider; 15 | 16 | use DBI::Test::Case::basic::disconnect; 17 | 18 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 19 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 20 | 21 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_mvb_dvn_connect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1; 6 | $ENV{DBI_MOCK} = 1; 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_SQL_NANO}; 12 | } 13 | 14 | use DBI::Mock; 15 | use DBI::Test::DSN::Provider; 16 | 17 | use DBI::Test::Case::basic::connect; 18 | 19 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::connect", ['dbi:NullP:',undef,undef,{}]); 20 | DBI::Test::Case::basic::connect->run_test($test_case_conf); 21 | 22 | -------------------------------------------------------------------------------- /t-mock/basic/zvpn_mvb_dvn_disconnect.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | BEGIN { 4 | $ENV{DBI_PUREPERL} = 2; 5 | $ENV{DBI_SQL_NANO} = 1; 6 | $ENV{DBI_MOCK} = 1; 7 | } 8 | 9 | END { 10 | delete $ENV{DBI_PUREPERL};; 11 | delete $ENV{DBI_SQL_NANO}; 12 | } 13 | 14 | use DBI::Mock; 15 | use DBI::Test::DSN::Provider; 16 | 17 | use DBI::Test::Case::basic::disconnect; 18 | 19 | my $test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("DBI::Test::Case::basic::disconnect", ['dbi:NullP:',undef,undef,{}]); 20 | DBI::Test::Case::basic::disconnect->run_test($test_case_conf); 21 | 22 | -------------------------------------------------------------------------------- /t/04mods.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | $|=1; 3 | 4 | use strict; 5 | 6 | use Test::More tests => 12; 7 | 8 | ## ---------------------------------------------------------------------------- 9 | ## 04mods.t - ... 10 | ## ---------------------------------------------------------------------------- 11 | # Note: 12 | # the modules tested here are all marked as new and not guaranteed, so this if 13 | # they change, these will fail. 14 | ## ---------------------------------------------------------------------------- 15 | 16 | BEGIN { 17 | use_ok( 'DBI' ); 18 | 19 | # load these first, since the other two load them 20 | # and we want to catch the error first 21 | use_ok( 'DBI::Const::GetInfo::ANSI' ); 22 | use_ok( 'DBI::Const::GetInfo::ODBC' ); 23 | 24 | use_ok( 'DBI::Const::GetInfoType', qw(%GetInfoType) ); 25 | use_ok( 'DBI::Const::GetInfoReturn', qw(%GetInfoReturnTypes %GetInfoReturnValues) ); 26 | } 27 | 28 | ## test GetInfoType 29 | 30 | cmp_ok(scalar(keys(%GetInfoType)), '>', 1, '... we have at least one key in the GetInfoType hash'); 31 | 32 | is_deeply( 33 | \%GetInfoType, 34 | { %DBI::Const::GetInfo::ANSI::InfoTypes, %DBI::Const::GetInfo::ODBC::InfoTypes }, 35 | '... the GetInfoType hash is constructed from the ANSI and ODBC hashes' 36 | ); 37 | 38 | ## test GetInfoReturnTypes 39 | 40 | cmp_ok(scalar(keys(%GetInfoReturnTypes)), '>', 1, '... we have at least one key in the GetInfoReturnType hash'); 41 | 42 | is_deeply( 43 | \%GetInfoReturnTypes, 44 | { %DBI::Const::GetInfo::ANSI::ReturnTypes, %DBI::Const::GetInfo::ODBC::ReturnTypes }, 45 | '... the GetInfoReturnType hash is constructed from the ANSI and ODBC hashes' 46 | ); 47 | 48 | ## test GetInfoReturnValues 49 | 50 | cmp_ok(scalar(keys(%GetInfoReturnValues)), '>', 1, '... we have at least one key in the GetInfoReturnValues hash'); 51 | 52 | # ... testing GetInfoReturnValues any further would be difficult 53 | 54 | ## test the two methods found in DBI::Const::GetInfoReturn 55 | 56 | can_ok('DBI::Const::GetInfoReturn', 'Format'); 57 | can_ok('DBI::Const::GetInfoReturn', 'Explain'); 58 | 59 | 1; 60 | -------------------------------------------------------------------------------- /t/12quote.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | 3 | use lib qw(blib/arch blib/lib); # needed since -T ignores PERL5LIB 4 | use strict; 5 | 6 | use Test::More tests => 10; 7 | 8 | use DBI qw(:sql_types); 9 | use Config; 10 | use Cwd; 11 | 12 | $^W = 1; 13 | $| = 1; 14 | 15 | my $dbh = DBI->connect('dbi:ExampleP:', '', ''); 16 | 17 | sub check_quote { 18 | # checking quote 19 | is($dbh->quote("quote's"), "'quote''s'", '... quoting strings with embedded single quotes'); 20 | is($dbh->quote("42", SQL_VARCHAR), "'42'", '... quoting number as SQL_VARCHAR'); 21 | is($dbh->quote("42", SQL_INTEGER), "42", '... quoting number as SQL_INTEGER'); 22 | is($dbh->quote(undef), "NULL", '... quoting undef as NULL'); 23 | } 24 | 25 | check_quote(); 26 | 27 | sub check_quote_identifier { 28 | 29 | is($dbh->quote_identifier('foo'), '"foo"', '... properly quotes foo as "foo"'); 30 | is($dbh->quote_identifier('f"o'), '"f""o"', '... properly quotes f"o as "f""o"'); 31 | is($dbh->quote_identifier('foo','bar'), '"foo"."bar"', '... properly quotes foo, bar as "foo"."bar"'); 32 | is($dbh->quote_identifier(undef,undef,'bar'), '"bar"', '... properly quotes undef, undef, bar as "bar"'); 33 | 34 | is($dbh->quote_identifier('foo',undef,'bar'), '"foo"."bar"', '... properly quotes foo, undef, bar as "foo"."bar"'); 35 | 36 | SKIP: { 37 | skip "Can't test alternate quote_identifier logic with DBI_AUTOPROXY", 1 38 | if $ENV{DBI_AUTOPROXY}; 39 | my $qi = $dbh->{dbi_quote_identifier_cache} || die "test out of date with dbi internals?"; 40 | $qi->[1] = '@'; # SQL_CATALOG_NAME_SEPARATOR 41 | $qi->[2] = 2; # SQL_CATALOG_LOCATION 42 | is($dbh->quote_identifier('foo',undef,'bar'), '"bar"@"foo"', '... now quotes it as "bar"@"foo" after flushing cache'); 43 | } 44 | } 45 | 46 | check_quote_identifier(); 47 | 48 | 1; 49 | -------------------------------------------------------------------------------- /t/14utf8.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | # vim:ts=8:sw=4 3 | $|=1; 4 | 5 | use Test::More; 6 | use DBI; 7 | 8 | eval { 9 | require Storable; 10 | import Storable qw(dclone); 11 | require Encode; 12 | import Encode qw(_utf8_on _utf8_off is_utf8); 13 | }; 14 | 15 | plan skip_all => "Unable to load required module ($@)" 16 | unless defined &_utf8_on; 17 | 18 | plan tests => 16; 19 | 20 | $dbh = DBI->connect("dbi:Sponge:foo","","", { 21 | PrintError => 0, 22 | RaiseError => 1, 23 | }); 24 | 25 | my $source_rows = [ # data for DBD::Sponge to return via fetch 26 | [ 41, "AAA", 9 ], 27 | [ 42, "BB", undef ], 28 | [ 43, undef, 7 ], 29 | [ 44, "DDD", 6 ], 30 | ]; 31 | 32 | my($sth, $col0, $col1, $col2, $rows); 33 | 34 | # set utf8 on one of the columns so we can check it carries through into the 35 | # keys of fetchrow_hashref 36 | my @col_names = qw(Col1 Col2 Col3); 37 | _utf8_on($col_names[1]); 38 | ok is_utf8($col_names[1]); 39 | ok !is_utf8($col_names[0]); 40 | 41 | $sth = $dbh->prepare("foo", { 42 | rows => dclone($source_rows), 43 | NAME => \@col_names, 44 | }); 45 | 46 | ok($sth->bind_columns(\($col0, $col1, $col2)) ); 47 | ok($sth->execute(), $DBI::errstr); 48 | 49 | ok $sth->fetch; 50 | cmp_ok $col1, 'eq', "AAA"; 51 | ok !is_utf8($col1); 52 | 53 | # force utf8 flag on 54 | _utf8_on($col1); 55 | ok is_utf8($col1); 56 | 57 | ok $sth->fetch; 58 | cmp_ok $col1, 'eq', "BB"; 59 | # XXX sadly this test doesn't detect the problem when using DBD::Sponge 60 | # because DBD::Sponge uses $sth->_set_fbav (correctly) and that uses 61 | # sv_setsv which doesn't have the utf8 persistence that sv_setpv does. 62 | ok !is_utf8($col1); # utf8 flag should have been reset 63 | 64 | ok $sth->fetch; 65 | ok !defined $col1; # null 66 | ok !is_utf8($col1); # utf8 flag should have been reset 67 | 68 | ok my $hash = $sth->fetchrow_hashref; 69 | ok 1 == grep { is_utf8($_) } keys %$hash; 70 | 71 | $sth->finish; 72 | 73 | # end 74 | -------------------------------------------------------------------------------- /t/20meta.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | 3 | use strict; 4 | use Test::More tests => 8; 5 | 6 | $|=1; 7 | $^W=1; 8 | 9 | BEGIN { use_ok( 'DBI', ':sql_types' ) } 10 | BEGIN { use_ok( 'DBI::DBD::Metadata' ) } # just to check for syntax errors etc 11 | 12 | my $dbh = DBI->connect("dbi:ExampleP:.","","", { FetchHashKeyName => 'NAME_lc' }) 13 | or die "Unable to connect to ExampleP driver: $DBI::errstr"; 14 | 15 | isa_ok($dbh, 'DBI::db'); 16 | #$dbh->trace(3); 17 | 18 | #use Data::Dumper; 19 | #print Dumper($dbh->type_info_all); 20 | #print Dumper($dbh->type_info); 21 | #print Dumper($dbh->type_info(DBI::SQL_INTEGER)); 22 | 23 | my @ti = $dbh->type_info; 24 | ok(@ti>0); 25 | 26 | is($dbh->type_info(SQL_INTEGER)->{DATA_TYPE}, SQL_INTEGER); 27 | is($dbh->type_info(SQL_INTEGER)->{TYPE_NAME}, 'INTEGER'); 28 | 29 | is($dbh->type_info(SQL_VARCHAR)->{DATA_TYPE}, SQL_VARCHAR); 30 | is($dbh->type_info(SQL_VARCHAR)->{TYPE_NAME}, 'VARCHAR'); 31 | 32 | 1; 33 | -------------------------------------------------------------------------------- /t/43prof_env.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | $|=1; 3 | 4 | use strict; 5 | 6 | # 7 | # test script for using DBI_PROFILE env var to enable DBI::Profile 8 | # and testing non-ref assignments to $h->{Profile} 9 | # 10 | 11 | BEGIN { $ENV{DBI_PROFILE} = 6 } # prior to use DBI 12 | 13 | use DBI; 14 | use DBI::Profile; 15 | use Config; 16 | use Data::Dumper; 17 | 18 | BEGIN { 19 | if ($DBI::PurePerl) { 20 | print "1..0 # Skipped: profiling not supported for DBI::PurePerl\n"; 21 | exit 0; 22 | } 23 | } 24 | 25 | use Test::More tests => 11; 26 | 27 | DBI->trace(0, "STDOUT"); 28 | 29 | my $dbh1 = DBI->connect("dbi:ExampleP:", '', '', { RaiseError=>1 }); 30 | is(ref $dbh1->{Profile}, "DBI::Profile"); 31 | is(ref $dbh1->{Profile}{Data}, 'HASH'); 32 | is(ref $dbh1->{Profile}{Path}, 'ARRAY'); 33 | 34 | my $dbh2 = DBI->connect("dbi:ExampleP:", '', '', { RaiseError=>1 }); 35 | is(ref $dbh2->{Profile}, "DBI::Profile"); 36 | is(ref $dbh2->{Profile}{Data}, 'HASH'); 37 | is(ref $dbh2->{Profile}{Path}, 'ARRAY'); 38 | 39 | is $dbh1->{Profile}, $dbh2->{Profile}, '$h->{Profile} should be shared'; 40 | 41 | $dbh1->do("set dummy=1"); 42 | $dbh1->do("set dummy=2"); 43 | 44 | my $profile = $dbh1->{Profile}; 45 | 46 | my $p_data = $profile->{Data}; 47 | is keys %$p_data, 3; # '', $sql1, $sql2 48 | ok $p_data->{''}; 49 | ok $p_data->{"set dummy=1"}; 50 | ok $p_data->{"set dummy=2"}; 51 | 52 | __END__ 53 | -------------------------------------------------------------------------------- /t/53sqlengine_adv.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | $| = 1; 3 | 4 | use strict; 5 | use warnings; 6 | 7 | require DBD::DBM; 8 | 9 | use File::Path; 10 | use File::Spec; 11 | use Test::More; 12 | use Cwd; 13 | use Config qw(%Config); 14 | use Storable qw(dclone); 15 | 16 | my $using_dbd_gofer = ( $ENV{DBI_AUTOPROXY} || '' ) =~ /^dbi:Gofer.*transport=/i; 17 | plan skip_all => "Modifying driver state won't compute running behind Gofer" if($using_dbd_gofer); 18 | 19 | use DBI; 20 | 21 | # <[Sno]> what I could do is create a new test case where inserting into a DBD::DBM and after that clone the meta into a DBD::File $dbh 22 | # <[Sno]> would that help to get a better picture? 23 | 24 | do "./t/lib.pl"; 25 | my $dir = test_dir(); 26 | 27 | my $dbm_dbh = DBI->connect( 'dbi:DBM:', undef, undef, { 28 | f_dir => $dir, 29 | sql_identifier_case => 2, # SQL_IC_LOWER 30 | } 31 | ); 32 | 33 | $dbm_dbh->do(q/create table FRED (a integer, b integer)/); 34 | $dbm_dbh->do(q/insert into fRED (a,b) values(1,2)/); 35 | $dbm_dbh->do(q/insert into FRED (a,b) values(2,1)/); 36 | 37 | my $f_dbh = DBI->connect( 'dbi:File:', undef, undef, { 38 | f_dir => $dir, 39 | sql_identifier_case => 2, # SQL_IC_LOWER 40 | } 41 | ); 42 | 43 | my $dbm_fred_meta = $dbm_dbh->f_get_meta("fred", [qw(dbm_type)]); 44 | $f_dbh->f_new_meta( "fred", {sql_table_class => "DBD::DBM::Table"} ); 45 | 46 | my $r = $f_dbh->selectall_arrayref(q/select * from Fred/); 47 | ok( @$r == 2, 'rows found via mixed case table' ); 48 | 49 | done_testing(); 50 | -------------------------------------------------------------------------------- /t/54_dbd_mem.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | $|=1; 3 | 4 | use strict; 5 | 6 | use Cwd; 7 | use File::Path; 8 | use File::Spec; 9 | use Test::More; 10 | 11 | my $using_dbd_gofer = ($ENV{DBI_AUTOPROXY}||"") =~ /^dbi:Gofer.*transport=/i; 12 | $using_dbd_gofer and plan skip_all => "modifying meta data doesn't work with Gofer-AutoProxy"; 13 | 14 | my $tbl; 15 | BEGIN { $tbl = "db_". $$ . "_" }; 16 | #END { $tbl and unlink glob "${tbl}*" } 17 | 18 | use_ok ("DBI"); 19 | use_ok ("DBD::Mem"); 20 | 21 | my $dbh = DBI->connect( "DBI:Mem:", undef, undef, { PrintError => 0, RaiseError => 0, } ); # Can't use DBI::DBD::SqlEngine direct 22 | 23 | for my $sql ( split "\n", <<"" ) 24 | CREATE TABLE foo (id INT, foo TEXT) 25 | CREATE TABLE bar (id INT, baz TEXT) 26 | INSERT INTO foo VALUES (1, 'Hello world') 27 | INSERT INTO bar VALUES (1, 'Bugfixes welcome') 28 | INSERT bar VALUES (2, 'Bug reports, too') 29 | SELECT foo FROM foo where ID=1 30 | UPDATE bar SET id=5 WHERE baz='Bugfixes welcome' 31 | DELETE FROM foo 32 | DELETE FROM bar WHERE baz='Bugfixes welcome' 33 | 34 | { 35 | my $done; 36 | $sql =~ s/^\s+//; 37 | eval { $done = $dbh->do( $sql ); }; 38 | ok( $done, "executed '$sql'" ) or diag $dbh->errstr; 39 | } 40 | 41 | done_testing (); 42 | -------------------------------------------------------------------------------- /t/65transact.t: -------------------------------------------------------------------------------- 1 | #!perl -w 2 | $|=1; 3 | 4 | use strict; 5 | 6 | use DBI; 7 | 8 | use Test::More; 9 | 10 | plan skip_all => 'Transactions not supported by DBD::Gofer' 11 | if $ENV{DBI_AUTOPROXY} && $ENV{DBI_AUTOPROXY} =~ /^dbi:Gofer/i; 12 | 13 | plan tests => 10; 14 | 15 | my $dbh = DBI->connect('dbi:ExampleP(AutoCommit=>1):', undef, undef) 16 | or die "Unable to connect to ExampleP driver: $DBI::errstr"; 17 | 18 | print "begin_work...\n"; 19 | ok($dbh->{AutoCommit}); 20 | ok(!$dbh->{BegunWork}); 21 | 22 | ok($dbh->begin_work); 23 | ok(!$dbh->{AutoCommit}); 24 | ok($dbh->{BegunWork}); 25 | 26 | $dbh->commit; 27 | ok($dbh->{AutoCommit}); 28 | ok(!$dbh->{BegunWork}); 29 | 30 | ok($dbh->begin_work({})); 31 | $dbh->rollback; 32 | ok($dbh->{AutoCommit}); 33 | ok(!$dbh->{BegunWork}); 34 | 35 | 1; 36 | -------------------------------------------------------------------------------- /t/73cachedkids.t: -------------------------------------------------------------------------------- 1 | use warnings; 2 | use strict; 3 | use Scalar::Util qw( weaken reftype refaddr blessed ); 4 | 5 | use DBI; 6 | use B (); 7 | use Tie::Hash (); 8 | use Test::More; 9 | 10 | my (%weak_dbhs, %weak_caches); 11 | 12 | # past this scope everything should be gone 13 | { 14 | 15 | ### get two identical connections 16 | my @dbhs = map { DBI->connect('dbi:ExampleP::memory:', undef, undef, { RaiseError => 1 }) } (1,2); 17 | 18 | ### get weakrefs on both handles 19 | %weak_dbhs = map { refdesc($_) => $_ } @dbhs; 20 | weaken $_ for values %weak_dbhs; 21 | 22 | ### tie the first one's cache 23 | if (1) { 24 | ok( 25 | tie( my %cache, 'Tie::StdHash'), 26 | refdesc($dbhs[0]) . ' cache tied' 27 | ); 28 | $dbhs[0]->{CachedKids} = \%cache; 29 | } 30 | 31 | ### prepare something on both 32 | $_->prepare_cached( 'SELECT name FROM .' ) 33 | for @dbhs; 34 | 35 | ### get weakrefs of both caches 36 | %weak_caches = map { 37 | sprintf( 'statement cache of %s (%s)', 38 | refdesc($_), 39 | refdesc($_->{CachedKids}) 40 | ) => $_->{CachedKids} 41 | } @dbhs; 42 | weaken $_ for values %weak_caches; 43 | 44 | ### check both caches have entries 45 | is (scalar keys %{$weak_caches{$_}}, 1, "One cached statement found in $_") 46 | for keys %weak_caches; 47 | 48 | ### check both caches have sane refcounts 49 | is ( refcount( $weak_caches{$_} ), 1, "Refcount of $_ correct") 50 | for keys %weak_caches; 51 | 52 | ### check both dbh have sane refcounts 53 | is ( refcount( $weak_dbhs{$_} ), 1, "Refcount of $_ correct") 54 | for keys %weak_dbhs; 55 | 56 | note "Exiting scope"; 57 | @dbhs=(); 58 | } 59 | 60 | # check both $dbh weakrefs are gone 61 | is ($weak_dbhs{$_}, undef, "$_ garbage collected") 62 | for keys %weak_dbhs; 63 | 64 | is ($weak_caches{$_}, undef, "$_ garbage collected") 65 | for keys %weak_caches; 66 | 67 | 68 | 69 | sub refdesc { 70 | sprintf '%s%s(0x%x)', 71 | ( defined( $_[1] = blessed $_[0]) ? "$_[1]=" : '' ), 72 | reftype $_[0], 73 | refaddr($_[0]), 74 | ; 75 | } 76 | 77 | sub refcount { 78 | B::svref_2object($_[0])->REFCNT; 79 | } 80 | 81 | done_testing; 82 | -------------------------------------------------------------------------------- /t/91_store_warning.t: -------------------------------------------------------------------------------- 1 | # Test if a warning can be recorded in the STORE method 2 | # which it couldn't in DBI 1.628 3 | # see https://rt.cpan.org/Ticket/Display.html?id=89015 4 | # This is all started from the fact that the SQLite ODBC Driver cannot set the 5 | # ReadOnly attribute (which is mapped to ODBC SQL_ACCESS_MODE) - it 6 | # legitimately returns SQL_SUCCESS_WITH_INFO option value changed. 7 | # It was decided that this should record a warning but when it was added to DBD::ODBC 8 | # DBI did not show the warning - keep_err? 9 | # Tim's comment on #dbi was: 10 | # the dispatcher has logic to notice if ErrCount went up during a call and disables keep_err in that case. 11 | # I think something similar might be needed for err. E.g., "if it's defined now but wasn't defined before" then 12 | # act appropriately. 13 | 14 | use strict; 15 | use warnings; 16 | use Test::More; 17 | use DBI; 18 | 19 | my $warning; 20 | 21 | $SIG{__WARN__} = sub { $warning = $_[0] }; 22 | 23 | my $dbh = DBI->connect('dbi:NullP:', '', '', {PrintWarn => 1}); 24 | 25 | is $warning, undef, 'initially not set'; 26 | 27 | $dbh->set_err("0", "warning plain"); 28 | like $warning, qr/^DBD::\w+::db set_err warning: warning plain/, "Warning recorded by store"; 29 | 30 | $dbh->set_err(undef, undef); 31 | undef $warning; 32 | 33 | $dbh->set_err("0", "warning \N{U+263A} smiley face"); 34 | like $warning, qr/^DBD::\w+::db set_err warning: warning \x{263A} smiley face/, "Warning recorded by store" 35 | or warn DBI::data_string_desc($warning); 36 | 37 | done_testing; 38 | -------------------------------------------------------------------------------- /t/lib.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # lib.pl is the file where database specific things should live, 4 | # wherever possible. For example, you define certain constants 5 | # here and the like. 6 | 7 | use strict; 8 | 9 | use File::Basename; 10 | use File::Path; 11 | use File::Spec; 12 | 13 | my $test_dir; 14 | END { defined( $test_dir ) and rmtree $test_dir } 15 | 16 | sub test_dir 17 | { 18 | unless( defined( $test_dir ) ) 19 | { 20 | $test_dir = File::Spec->rel2abs( File::Spec->curdir () ); 21 | $test_dir = File::Spec->catdir ( $test_dir, "test_output_" . $$ ); 22 | $test_dir = VMS::Filespec::unixify($test_dir) if $^O eq 'VMS'; 23 | rmtree $test_dir if -d $test_dir; 24 | mkpath $test_dir; 25 | # There must be at least one directory in the test directory, 26 | # and nothing guarantees that dot or dot-dot directories will exist. 27 | mkpath ( File::Spec->catdir( $test_dir, '000_just_testing' ) ); 28 | } 29 | 30 | return $test_dir; 31 | } 32 | 33 | 1; 34 | -------------------------------------------------------------------------------- /typemap: -------------------------------------------------------------------------------- 1 | const char * T_PV 2 | imp_xxh_t * T_PTROBJ 3 | DBI_imp_data_ * T_PTROBJ 4 | -------------------------------------------------------------------------------- /xt/00_perlversion.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | eval "use Test::More 0.93"; 7 | if ($@ || $] < 5.010) { 8 | print "1..0 # perl-5.10.0 + Test::More 0.93 required for version checks\n"; 9 | exit 0; 10 | } 11 | eval "use Test::MinimumVersion"; 12 | if ($@) { 13 | print "1..0 # Test::MinimumVersion required for compatability tests\n"; 14 | exit 0; 15 | } 16 | 17 | my @pm = sort "DBI.pm", 18 | (glob "lib/*/*.pm"), 19 | (glob "lib/*/*/*.pm"), 20 | (glob "lib/*/*/*/*.pm"); 21 | 22 | my %f5xx = ( 23 | "5.008.1" => { map { $_ => 1 } @pm, glob ("t/*"), glob ("xt/*.t"), glob ("*.PL") }, 24 | "5.010.0" => {}, 25 | "5.012.0" => {}, 26 | "5.014.0" => { map { $_ => 1 } "xt/20_kwalitee.t" }, 27 | "5.016.0" => {}, 28 | ); 29 | 30 | my @v = sort keys %f5xx; 31 | foreach my $v (reverse @v) { 32 | foreach my $f (sort keys %{$f5xx{$v}}) { 33 | foreach my $x (grep { $_ lt $v } @v) { 34 | delete $f5xx{$x}{$f} 35 | } 36 | } 37 | } 38 | 39 | foreach my $v (@v) { 40 | my @f = sort keys %{$f5xx{$v}} or next; 41 | subtest ($v => sub { all_minimum_version_ok ($v, { paths => [ @f ]}); }); 42 | } 43 | 44 | done_testing (); 45 | -------------------------------------------------------------------------------- /xt/00_pod.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Note: ALSO extensively checked in make_doc.pl now 4 | 5 | use strict; 6 | use warnings; 7 | 8 | use Test::More; 9 | 10 | eval "use Test::Pod 1.00"; 11 | plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; 12 | all_pod_files_ok (); 13 | -------------------------------------------------------------------------------- /xt/01_pod.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use Test::More; 7 | 8 | eval "use Test::Pod::Coverage tests => 1"; 9 | plan skip_all => "Test::Pod::Coverage required for testing POD Coverage" if $@; 10 | pod_coverage_ok ("DBI", "DBI is covered"); 11 | -------------------------------------------------------------------------------- /xt/02_pod-spell.t: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use Test::More; 7 | eval "use Pod::Spell::CommonMistakes qw( check_pod )"; 8 | plan skip_all => "Pod::Spell::CommonMistakes required for testing POD spelling" if $@; 9 | 10 | use File::Find; 11 | 12 | my @files; 13 | find (sub { 14 | $File::Find::dir =~ m/\bblib/ and return; 15 | m/\.pm$/ and push @files, $File::Find::name; 16 | }, "."); 17 | s{^\./}{} for @files; 18 | 19 | foreach my $pm (sort @files) { 20 | my $result = check_pod ($pm); 21 | my @keys = keys %$result; 22 | 23 | is (scalar @keys, 0, "$pm"); 24 | @keys or next; 25 | 26 | diag (join "\n", map { "$_\t=> $result->{$_}" } @keys); 27 | } 28 | 29 | done_testing; 30 | 31 | 1; 32 | -------------------------------------------------------------------------------- /xt/10_perm.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | eval "use Test::PAUSE::Permissions"; 7 | 8 | if ($@ || $] < 5.018) { 9 | print "1..0 # No perl permission check for old releases\n"; 10 | exit 0; 11 | } 12 | 13 | BEGIN { $ENV{RELEASE_TESTING} = 1; } 14 | 15 | all_permissions_ok ("HMBRAND"); 16 | -------------------------------------------------------------------------------- /xt/20_kwalitee.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use 5.012001; 4 | use warnings; 5 | use Test::More; 6 | 7 | BEGIN { $ENV{AUTHOR_TESTING} = 1; } 8 | eval "use Test::Kwalitee qw( kwalitee_ok );"; 9 | if ($@) { 10 | diag $@ =~ s{\s+at\s+\S+\s+line\s+\d.*\z}{}rs; 11 | plan skip_all => "1..0 # Test::Kwalitee required for this test\n"; 12 | } 13 | 14 | kwalitee_ok (qw( 15 | -has_meta_yml 16 | -metayml_conforms_spec_current 17 | -metayml_conforms_to_known_spec 18 | -metayml_declares_perl_version 19 | -metayml_has_license 20 | -metayml_has_provides 21 | -metayml_is_parsable 22 | -no_symlinks 23 | )); 24 | 25 | my @experimental = qw( 26 | no_stdin_for_prompting 27 | prereq_matches_use 28 | has_test_pod 29 | has_test_pod_coverage 30 | use_warnings 31 | 32 | build_prereq_matches_use 33 | easily_repackageable 34 | easily_repackageable_by_debian 35 | easily_repackageable_by_fedora 36 | fits_fedora_license 37 | has_license_in_source_file 38 | has_version_in_each_file 39 | uses_test_nowarnings 40 | ); 41 | 42 | done_testing (); 43 | -------------------------------------------------------------------------------- /xt/30_links.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | use Test::More; 6 | 7 | eval "use Test::Pod::Links"; 8 | plan skip_all => "Test::Pod::Links required for testing POD links" if $@; 9 | Test::Pod::Links->new->pod_file_ok ("DBI.pm"); 10 | done_testing (); 11 | -------------------------------------------------------------------------------- /xt/40_filenames.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | use Test::More; 6 | 7 | eval "use Test::Portability::Files"; 8 | plan skip_all => "1..0 # Test::Portability::Files required for these tests\n" if $@; 9 | 10 | BEGIN { $ENV{RELEASE_TESTING} = 1; } 11 | 12 | options (use_file_find => 0, test_amiga_length => 1, test_mac_length => 1); 13 | run_tests (); 14 | -------------------------------------------------------------------------------- /xt/50_manifest.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | use Test::More; 6 | 7 | eval "use Test::DistManifest"; 8 | plan skip_all => "Test::DistManifest required for testing MANIFEST" if $@; 9 | manifest_ok (); 10 | done_testing; 11 | -------------------------------------------------------------------------------- /xt/60_changelog.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | use Test::More; 6 | 7 | eval "use Test::CPAN::Changes"; 8 | plan skip_all => "Test::CPAN::Changes required for this test" if $@; 9 | 10 | changes_file_ok ("ChangeLog"); 11 | 12 | done_testing; 13 | -------------------------------------------------------------------------------- /xt/70_cve.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use Test::More; 7 | use Test::CVE; 8 | 9 | has_no_cves; 10 | 11 | done_testing; 12 | -------------------------------------------------------------------------------- /xt/README: -------------------------------------------------------------------------------- 1 | This directory contains assorted 'extra tests' and random development stuff 2 | that maybe should be moved to folder sandbox. 3 | -------------------------------------------------------------------------------- /xt/goferdemo.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | $|=1; 3 | 4 | use strict; 5 | use warnings; 6 | use File::Path; 7 | use File::Spec; 8 | use Cwd; 9 | 10 | use DBI; 11 | 12 | $ENV{DBI_SQL_NANO}=1; 13 | 14 | my $dir = File::Spec->catdir(getcwd(),'test_output'); 15 | rmtree $dir; 16 | mkpath $dir; 17 | 18 | my $dtype = 'SDBM_File'; 19 | 20 | my $dbh = DBI->connect( "dbi:DBM:dbm_type=$dtype;lockfile=0" ); 21 | 22 | for my $sql ( split /\s*;\n/, join '', ) { 23 | $sql =~ s/\S*fruit/${dtype}_fruit/; # include dbm type in table name 24 | $sql =~ s/;$//; # in case no final \n on last line of __DATA__ 25 | print " $sql\n"; 26 | my $sth = $dbh->prepare($sql) or die $dbh->errstr; 27 | $sth->execute; 28 | die $sth->errstr if $sth->err and $sql !~ /DROP/; 29 | next unless $sql =~ /SELECT/; 30 | while (my ($key, $value) = $sth->fetchrow_array) { 31 | print "$key: $value\n"; 32 | } 33 | } 34 | $dbh->disconnect; 35 | 36 | rmtree $dir; 37 | exit 0; 38 | 1; 39 | __DATA__ 40 | DROP TABLE IF EXISTS fruit; 41 | CREATE TABLE fruit (dKey INT, dVal VARCHAR(10)); 42 | INSERT INTO fruit VALUES (1,'oranges' ); 43 | INSERT INTO fruit VALUES (2,'to_change' ); 44 | INSERT INTO fruit VALUES (3, NULL ); 45 | INSERT INTO fruit VALUES (4,'to delete' ); 46 | UPDATE fruit SET dVal='apples' WHERE dKey=2; 47 | DELETE FROM fruit WHERE dVal='to delete'; 48 | SELECT * FROM fruit; 49 | SELECT * FROM fruit; 50 | --------------------------------------------------------------------------------