{
    "mode": "perldoc",
    "parameter": "DBD::CSV",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3ACSV/json",
    "generated": "2026-10-07T18:42:46Z",
    "synopsis": "use DBI;\n# See \"Creating database handle\" below\n$dbh = DBI->connect (\"dbi:CSV:\", undef, undef, {\nfext      => \".csv/r\",\nRaiseError => 1,\n}) or die \"Cannot connect: $DBI::errstr\";\n# Simple statements\n$dbh->do (\"CREATE TABLE foo (id INTEGER, name CHAR (10))\");\n# Selecting\nmy $sth = $dbh->prepare (\"select * from foo\");\n$sth->execute;\n$sth->bindcolumns (\\my ($id, $name));\nwhile ($sth->fetch) {\nprint \"id: $id, name: $name\\n\";\n}\n# Updates\nmy $sth = $dbh->prepare (\"UPDATE foo SET name = ? WHERE id = ?\");\n$sth->execute (\"DBI rocks!\", 1);\n$sth->finish;\n$dbh->disconnect;",
    "sections": {
        "NAME": {
            "content": "DBD::CSV - DBI driver for CSV files\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use DBI;\n# See \"Creating database handle\" below\n$dbh = DBI->connect (\"dbi:CSV:\", undef, undef, {\nfext      => \".csv/r\",\nRaiseError => 1,\n}) or die \"Cannot connect: $DBI::errstr\";\n\n# Simple statements\n$dbh->do (\"CREATE TABLE foo (id INTEGER, name CHAR (10))\");\n\n# Selecting\nmy $sth = $dbh->prepare (\"select * from foo\");\n$sth->execute;\n$sth->bindcolumns (\\my ($id, $name));\nwhile ($sth->fetch) {\nprint \"id: $id, name: $name\\n\";\n}\n\n# Updates\nmy $sth = $dbh->prepare (\"UPDATE foo SET name = ? WHERE id = ?\");\n$sth->execute (\"DBI rocks!\", 1);\n$sth->finish;\n\n$dbh->disconnect;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The DBD::CSV module is yet another driver for the DBI (Database independent interface for Perl).\nThis one is based on the SQL \"engine\" SQL::Statement and the abstract DBI driver DBD::File and\nimplements access to so-called CSV files (Comma Separated Values). Such files are often used for\nexporting MS Access and MS Excel data.\n\nSee DBI for details on DBI, SQL::Statement for details on SQL::Statement and DBD::File for\ndetails on the base class DBD::File.\n",
            "subsections": [
                {
                    "name": "Prerequisites",
                    "content": "The only system dependent feature that DBD::File uses, is the \"flock ()\" function. Thus the\nmodule should run (in theory) on any system with a working \"flock ()\", in particular on all Unix\nmachines and on Windows NT. Under Windows 95 and MacOS the use of \"flock ()\" is disabled, thus\nthe module should still be usable.\n\nUnlike other DBI drivers, you don't need an external SQL engine or a running server. All you\nneed are the following Perl modules, available from any CPAN mirror, for example\n\nhttp://search.cpan.org/\n\nDBI A recent version of the DBI (Database independent interface for Perl). See below why.\n\nDBD::File\nThis is the base class for DBD::CSV, and it is part of the DBI distribution. As DBD::CSV\nrequires a matching version of DBD::File which is (partly) developed by the same team that\nmaintains DBD::CSV. See META.json or Makefile.PL for the minimum versions.\n\nSQL::Statement\nA simple SQL engine. This module defines all of the SQL syntax for DBD::CSV, new SQL support\nis added with each release so you should look for updates to SQL::Statement regularly.\n\nIt is possible to run \"DBD::CSV\" without this module if you define the environment variable\n$DBISQLNANO to 1. This will reduce the SQL support a lot though. See DBI::SQL::Nano for\nmore details. Note that the test suite does only test in this mode in the development\nenvironment.\n\nText::CSVXS\nThis module is used to read and write rows in a CSV file.\n"
                },
                {
                    "name": "Installation",
                    "content": "Installing this module (and the prerequisites from above) is quite simple. The simplest way is\nto install the bundle:\n\n$ cpan Bundle::DBD::CSV\n\nAlternatively, you can name them all\n\n$ cpan Text::CSVXS DBI DBD::CSV\n\nor even trust \"cpan\" to resolve all dependencies for you:\n\n$ cpan DBD::CSV\n\nIf you cannot, for whatever reason, use cpan, fetch all modules from CPAN, and build with a\nsequence like:\n\ngzip -d < DBD-CSV-0.40.tgz | tar xf -\n\n(this is for Unix users, Windows users would prefer WinZip or something similar) and then enter\nthe following:\n\ncd DBD-CSV-0.40\nperl Makefile.PL\nmake test\n\nIf any tests fail, let us know. Otherwise go on with\n\nmake install UNINST=1\n\nNote that you almost definitely need root or administrator permissions. If you don't have them,\nread the ExtUtils::MakeMaker man page for details on installing in your own directories.\nExtUtils::MakeMaker.\n"
                },
                {
                    "name": "Supported SQL Syntax",
                    "content": "All SQL processing for DBD::CSV is done by SQL::Statement. See SQL::Statement for more specific\ninformation about its feature set. Features include joins, aliases, built-in and user-defined\nfunctions, and more. See SQL::Statement::Syntax for a description of the SQL syntax supported in\nDBD::CSV.\n\nTable- and column-names are case insensitive unless quoted. Column names will be sanitized\nunless \"rawheader\" is true.\n"
                }
            ]
        },
        "Using DBD::CSV with DBI": {
            "content": "For most things, DBD-CSV operates the same as any DBI driver. See DBI for detailed usage.\n\nCreating a database handle (connect)\nCreating a database handle usually implies connecting to a database server. Thus this command\nreads\n\nuse DBI;\nmy $dbh = DBI->connect (\"dbi:CSV:\", \"\", \"\", {\nfdir => \"/home/user/folder\",\n});\n\nThe directory tells the driver where it should create or open tables (a.k.a. files). It defaults\nto the current directory, so the following are equivalent:\n\n$dbh = DBI->connect (\"dbi:CSV:\");\n$dbh = DBI->connect (\"dbi:CSV:\", undef, undef, { fdir => \".\" });\n$dbh = DBI->connect (\"dbi:CSV:fdir=.\");\n\nWe were told, that VMS might - for whatever reason - require:\n\n$dbh = DBI->connect (\"dbi:CSV:fdir=\");\n\nThe preferred way of passing the arguments is by driver attributes:\n\n# specify most possible flags via driver flags\n$dbh = DBI->connect (\"dbi:CSV:\", undef, undef, {\nfschema         => undef,\nfdir            => \"data\",\nfdirsearch     => [],\nfext            => \".csv/r\",\nflock           => 2,\nfencoding       => \"utf8\",\n\ncsveol          => \"\\r\\n\",\ncsvsepchar     => \",\",\ncsvquotechar   => '\"',\ncsvescapechar  => '\"',\ncsvclass        => \"Text::CSVXS\",\ncsvnull         => 1,\ncsvbom          => 0,\ncsvtables       => {\nsyspwd => {\nsepchar    => \":\",\nquotechar  => undef,\nescapechar => undef,\nfile        => \"/etc/passwd\",\ncolnames   => [qw( login password\nuid gid realname\ndirectory shell )],\n},\n},\n\nRaiseError       => 1,\nPrintError       => 1,\nFetchHashKeyName => \"NAMElc\",\n}) or die $DBI::errstr;\n\nbut you may set these attributes in the DSN as well, separated by semicolons. Pay attention to\nthe semi-colon for \"csvsepchar\" (as seen in many CSV exports from MS Excel) is being escaped\nin below example, as is would otherwise be seen as attribute separator:\n\n$dbh = DBI->connect (\n\"dbi:CSV:fdir=$ENV{HOME}/csvdb;fext=.csv;flock=2;\" .\n\"fencoding=utf8;csveol=\\n;csvsepchar=\\\\;;\" .\n\"csvquotechar=\\\";csvescapechar=\\\\;csvclass=Text::CSVXS;\" .\n\"csvnull=1\") or die $DBI::errstr;\n\nUsing attributes in the DSN is easier to use when the DSN is derived from an outside source\n(environment variable, database entry, or configure file), whereas specifying entries in the\nattribute hash is easier to read and to maintain.\n\nThe default value for \"csvbinary\" is 1 (True).\n\nThe default value for \"csvautodiag\" is <1>. Note that this might cause trouble on perl\nversions older than 5.8.9, so up to and including perl version 5.8.8 it might be required to use\n\";csvautodiag=0\" inside the \"DSN\" or \"csvautodiag =\" 0> inside the attributes.\n",
            "subsections": [
                {
                    "name": "Creating and dropping tables",
                    "content": "You can create and drop tables with commands like the following:\n\n$dbh->do (\"CREATE TABLE $table (id INTEGER, name CHAR (64))\");\n$dbh->do (\"DROP TABLE $table\");\n\nNote that currently only the column names will be stored and no other data. Thus all other\ninformation including column type (INTEGER or CHAR (x), for example), column attributes (NOT\nNULL, PRIMARY KEY, ...) will silently be discarded. This may change in a later release.\n\nA drop just removes the file without any warning.\n\nSee DBI for more details.\n\nTable names cannot be arbitrary, due to restrictions of the SQL syntax. I recommend that table\nnames are valid SQL identifiers: The first character is alphabetic, followed by an arbitrary\nnumber of alphanumeric characters. If you want to use other files, the file names must start\nwith \"/\", \"./\" or \"../\" and they must not contain white space.\n"
                },
                {
                    "name": "Inserting, fetching and modifying data",
                    "content": "The following examples insert some data in a table and fetch it back: First, an example where\nthe column data is concatenated in the SQL string:\n\n$dbh->do (\"INSERT INTO $table VALUES (1, \".\n$dbh->quote (\"foobar\") . \")\");\n\nNote the use of the quote method for escaping the word \"foobar\". Any string must be escaped,\neven if it does not contain binary data.\n\nNext, an example using parameters:\n\n$dbh->do (\"INSERT INTO $table VALUES (?, ?)\", undef, 2,\n\"It's a string!\");\n\nNote that you don't need to quote column data passed as parameters. This version is particularly\nwell designed for loops. Whenever performance is an issue, I recommend using this method.\n\nYou might wonder about the \"undef\". Don't wonder, just take it as it is. :-) It's an attribute\nargument that I have never used and will be passed to the prepare method as the second argument.\n\nTo retrieve data, you can use the following:\n\nmy $query = \"SELECT * FROM $table WHERE id > 1 ORDER BY id\";\nmy $sth   = $dbh->prepare ($query);\n$sth->execute ();\nwhile (my $row = $sth->fetchrowhashref) {\nprint \"Found result row: id = \", $row->{id},\n\", name = \", $row->{name};\n}\n$sth->finish ();\n\nAgain, column binding works: The same example again.\n\nmy $sth = $dbh->prepare (qq;\nSELECT * FROM $table WHERE id > 1 ORDER BY id;\n;);\n$sth->execute;\nmy ($id, $name);\n$sth->bindcolumns (undef, \\$id, \\$name);\nwhile ($sth->fetch) {\nprint \"Found result row: id = $id, name = $name\\n\";\n}\n$sth->finish;\n\nOf course you can even use input parameters. Here's the same example for the third time:\n\nmy $sth = $dbh->prepare (\"SELECT * FROM $table WHERE id = ?\");\n$sth->bindcolumns (undef, \\$id, \\$name);\nfor (my $i = 1; $i <= 2; $i++) {\n$sth->execute ($id);\nif ($sth->fetch) {\nprint \"Found result row: id = $id, name = $name\\n\";\n}\n$sth->finish;\n}\n\nSee DBI for details on these methods. See SQL::Statement for details on the WHERE clause.\n\nData rows are modified with the UPDATE statement:\n\n$dbh->do (\"UPDATE $table SET id = 3 WHERE id = 1\");\n\nLikewise you use the DELETE statement for removing rows:\n\n$dbh->do (\"DELETE FROM $table WHERE id > 1\");\n"
                },
                {
                    "name": "Error handling",
                    "content": "In the above examples we have never cared about return codes. Of course, this is not\nrecommended. Instead we should have written (for example):\n\nmy $sth = $dbh->prepare (\"SELECT * FROM $table WHERE id = ?\") or\ndie \"prepare: \" . $dbh->errstr ();\n$sth->bindcolumns (undef, \\$id, \\$name) or\ndie \"bindcolumns: \" . $dbh->errstr ();\nfor (my $i = 1; $i <= 2; $i++) {\n$sth->execute ($id) or\ndie \"execute: \" . $dbh->errstr ();\n$sth->fetch and\nprint \"Found result row: id = $id, name = $name\\n\";\n}\n$sth->finish ($id) or die \"finish: \" . $dbh->errstr ();\n\nObviously this is tedious. Fortunately we have DBI's *RaiseError* attribute:\n\n$dbh->{RaiseError} = 1;\n$@ = \"\";\neval {\nmy $sth = $dbh->prepare (\"SELECT * FROM $table WHERE id = ?\");\n$sth->bindcolumns (undef, \\$id, \\$name);\nfor (my $i = 1; $i <= 2; $i++) {\n$sth->execute ($id);\n$sth->fetch and\nprint \"Found result row: id = $id, name = $name\\n\";\n}\n$sth->finish ($id);\n};\n$@ and die \"SQL database error: $@\";\n\nThis is not only shorter, it even works when using DBI methods within subroutines.\n\nDBI database handle attributes"
                },
                {
                    "name": "Metadata",
                    "content": "The following attributes are handled by DBI itself and not by DBD::File, thus they all work as\nexpected:\n\nActive\nActiveKids\nCachedKids\nCompatMode             (Not used)\nInactiveDestroy\nKids\nPrintError\nRaiseError\nWarn                   (Not used)\n\nThe following DBI attributes are handled by DBD::File:\n\nAutoCommit\nAlways on\n\nChopBlanks\nWorks\n\nNUMOFFIELDS\nValid after \"$sth->execute\"\n\nNUMOFPARAMS\nValid after \"$sth->prepare\"\n\nNAME\nNAMElc\nNAMEuc\nValid after \"$sth->execute\"; undef for Non-Select statements.\n\nNULLABLE\nNot really working. Always returns an array ref of one's, as DBD::CSV does not verify input\ndata. Valid after \"$sth->execute\"; undef for non-Select statements.\n\nThese attributes and methods are not supported:\n\nbindparaminout\nCursorName\nLongReadLen\nLongTruncOk\n\nDBD-CSV specific database handle attributes\nIn addition to the DBI attributes, you can use the following dbh attributes:\n\nDBD::File attributes\nfdir\nThis attribute is used for setting the directory where CSV files are opened. Usually you set\nit in the dbh and it defaults to the current directory (\".\"). However, it may be overridden\nin statement handles.\n\nfdirsearch\nThis attribute optionally defines a list of extra directories to search when opening\nexisting tables. It should be an anonymous list or an array reference listing all folders\nwhere tables could be found.\n\nmy $dbh = DBI->connect (\"dbi:CSV:\", \"\", \"\", {\nfdir        => \"data\",\nfdirsearch => [ \"ref/data\", \"ref/old\" ],\nfext        => \".csv/r\",\n}) or die $DBI::errstr;\n\nfext\nThis attribute is used for setting the file extension.\n\nfschema\nThis attribute allows you to set the database schema name. The default is to use the owner\nof \"fdir\". \"undef\" is allowed, but not in the DSN part.\n\nmy $dbh = DBI->connect (\"dbi:CSV:\", \"\", \"\", {\nfschema => undef,\nfdir    => \"data\",\nfext    => \".csv/r\",\n}) or die $DBI::errstr;\n\nfencoding\nThis attribute allows you to set the encoding of the data. With CSV, it is not possible to\nset (and remember) the encoding on a column basis, but DBD::File now allows the encoding to\nbe set on the underlying file. If this attribute is not set, or undef is passed, the file\nwill be seen as binary.\n\nflock\nWith this attribute you can specify a locking mode to be used (if locking is supported at\nall) for opening tables. By default, tables are opened with a shared lock for reading, and\nwith an exclusive lock for writing. The supported modes are:\n\n0 Force no locking at all.\n\n1 Only shared locks will be used.\n\n2 Only exclusive locks will be used.\n\nBut see \"KNOWN BUGS\" in DBD::File.\n\nDBD::CSV specific attributes\ncsvclass\nThe attribute *csvclass* controls the CSV parsing engine. This defaults to \"Text::CSVXS\",\nbut \"Text::CSV\" can be used in some cases, too. Please be aware that \"Text::CSV\" does not\ncare about any edge case as \"Text::CSVXS\" does and that \"Text::CSV\" is probably about 100\ntimes slower than \"Text::CSVXS\".\n\nIn order to use the specified class other than \"Text::CSVXS\", it needs to be loaded before\nuse. \"DBD::CSV\" does not \"require\"/\"use\" the specified class itself.\n"
                },
                {
                    "name": "Text::CSVXS specific attributes",
                    "content": "csveol\ncsvsepchar\ncsvquotechar\ncsvescapechar\ncsvcsv\nThe attributes *csveol*, *csvsepchar*, *csvquotechar* and *csvescapechar* are\ncorresponding to the respective attributes of the *csvclass* (usually Text::CSVCS) object.\nYou may want to set these attributes if you have unusual CSV files like /etc/passwd or MS\nExcel generated CSV files with a semicolon as separator. Defaults are \"\\015\\012\"\", \",\", \"\"\"\nand \"\"\", respectively.\n\nThe *csveol* attribute defines the end-of-line pattern, which is better known as a record\nseparator pattern since it separates records. The default is windows-style end-of-lines\n\"\\015\\012\" for output (writing) and unset for input (reading), so if on unix you may want to\nset this to newline (\"\\n\") like this:\n\n$dbh->{csveol} = \"\\n\";\n\nIt is also possible to use multi-character patterns as record separators. For example this\nfile uses newlines as field separators (sepchar) and the pattern \"\\nENDREC\\n\" as the\nrecord separators (eol):\n\nname\ncity\nENDREC\njoe\nseattle\nENDREC\nsue\nportland\nENDREC\n\nTo handle this file, you'd do this:\n\n$dbh->{eol}      = \"\\nENDREC\\n\" ,\n$dbh->{sepchar} = \"\\n\"\n\nThe attributes are used to create an instance of the class *csvclass*, by default\nText::CSVXS. Alternatively you may pass an instance as *csvcsv*, the latter takes\nprecedence. Note that the *binary* attribute *must* be set to a true value in that case.\n\nAdditionally you may overwrite these attributes on a per-table base in the *csvtables*\nattribute.\n\ncsvnull\nWith this option set, all new statement handles will set \"alwaysquote\" and \"blankisundef\"\nin the CSV parser and writer, so it knows how to distinguish between the empty string and\n\"undef\" or \"NULL\". You cannot reset it with a false value. You can pass it to connect, or\nset it later:\n\n$dbh = DBI->connect (\"dbi:CSV:\", \"\", \"\", { csvnull => 1 });\n\n$dbh->{csvnull} = 1;\n\ncsvbom\nWith this option set, the CSV parser will try to detect BOM (Byte Order Mark) in the header\nline. This requires Text::CSVXS version 1.22 or higher.\n\n$dbh = DBI->connect (\"dbi:CSV:\", \"\", \"\", { csvbom => 1 });\n\n$dbh->{csvbom} = 1;\n\ncsvtables\nThis hash ref is used for storing table dependent metadata. For any table it contains an\nelement with the table name as key and another hash ref with the following attributes:\n\no   All valid attributes to the CSV parsing module. Any of them can optionally be prefixed\nwith \"csv\".\n\no   All attributes valid to DBD::File\n\nIf you pass it \"ffile\" or its alias \"file\", \"fext\" has no effect, but \"fdir\" and\n\"fencoding\" still have.\n\ncsvtables => {\nsyspwd => {                   # Table name\ncsvsepchar => \":\",      # Text::CSVXS\nquotechar   => undef,    # Text::CSVXS\nescapechar  => undef,    # Text::CSVXS\nfdir        => \"/etc\",   # DBD::File\nffile       => \"passwd\", # DBD::File\ncolnames    =>           # DBD::File\n[qw( login password uid gid realname directory shell )],\n},\n},\n\ncsv*\nAll other attributes that start with \"csv\" and are not described above will be passed to\n\"Text::CSVXS\" (without the \"csv\" prefix). These extra options are only likely to be useful\nfor reading (select) handles. Examples:\n\n$dbh->{csvallowwhitespace}    = 1;\n$dbh->{csvallowloosequotes}  = 1;\n$dbh->{csvallowlooseescapes} = 1;\n\nSee the \"Text::CSVXS\" documentation for the full list and the documentation.\n"
                },
                {
                    "name": "Driver specific attributes",
                    "content": "ffile\nThe name of the file used for the table; defaults to\n\n\"$dbh->{fdir}/$table\"\n\neol\nsepchar\nquotechar\nescapechar\nclass\ncsv These correspond to the attributes *csveol*, *csvsepchar*, *csvquotechar*,\n*csvescapechar*, *csvclass* and *csvcsv*. The difference is that they work on a\nper-table basis.\n\ncolnames\nskipfirstrow\nBy default DBD::CSV assumes that column names are stored in the first row of the CSV file\nand sanitizes them (see \"rawheader\" below). If this is not the case, you can supply an\narray ref of table names with the *colnames* attribute. In that case the attribute\n*skipfirstrow* will be set to FALSE.\n\nIf you supply an empty array ref, the driver will read the first row for you, count the\nnumber of columns and create column names like \"col0\", \"col1\", ...\n\nNote that column names that match reserved SQL words will cause unwanted and sometimes\nconfusing errors. If your CSV has headers that match reserved words, you will require these\ntwo attributes.\n\nIf \"test.csv\" looks like\n\nselect,from\n1,2\n\nthe select query would result in \"select select, from from test;\", which obviously is\nillegal SQL.\n\nrawheader\nDue to the SQL standard, field names cannot contain special characters like a dot (\".\") or a\nspace (\" \") unless the column names are quoted. Following the approach of mdbtools, all\nthese tokens are translated to an underscore (\"\") when reading the first line of the CSV\nfile, so all field names are 'sanitized'. If you do not want this to happen, set\n\"rawheader\" to a true value and the entries in the first line of the CSV data will be used\nverbatim for column headers and field names. DBD::CSV cannot guarantee that any part in the\ntoolchain will work if field names have those characters, and the chances are high that the\nSQL statements will fail.\n\nCurrently, the sanitizing of headers is as simple as\n\ns/\\W//g;\n\nNote that headers (column names) might be folded in other parts of the code stack,\nspecifically SQL::Statement, whose docs mention:\n\nWildcards are expanded to lower cased identifiers. This might\nconfuse some people, but it was easier to implement.\n\nThat means that in\n\nmy $sth = $dbh->prepare (\"select * from foo\");\n$sth->execute;\nwhile (my $row = $sth->fetchrowhashref) {\nsay for keys %$row;\n}\n\nall keys will show as all lower case, regardless of the original header.\n\nIt's strongly recommended to check the attributes supported by \"Metadata\" in DBD::File.\n\nExample: Suppose you want to use /etc/passwd as a CSV file. :-) There simplest way is:\n\nuse DBI;\nmy $dbh = DBI->connect (\"dbi:CSV:\", undef, undef, {\nfdir           => \"/etc\",\ncsvsepchar    => \":\",\ncsvquotechar  => undef,\ncsvescapechar => undef,\n});\n$dbh->{csvtables}{passwd} = {\ncolnames => [qw( login password uid gid realname\ndirectory shell )];\n};\n$sth = $dbh->prepare (\"SELECT * FROM passwd\");\n\nAnother possibility where you leave all the defaults as they are and override them on a per\ntable basis:\n\nrequire DBI;\nmy $dbh = DBI->connect (\"dbi:CSV:\");\n$dbh->{csvtables}{passwd} = {\neol         => \"\\n\",\nsepchar    => \":\",\nquotechar  => undef,\nescapechar => undef,\nffile      => \"/etc/passwd\",\ncolnames   => [qw( login password uid gid\nrealname directory shell )],\n};\n$sth = $dbh->prepare (\"SELECT * FROM passwd\");\n"
                },
                {
                    "name": "Driver private methods",
                    "content": "These methods are inherited from DBD::File:\n\ndatasources\nThe \"datasources\" method returns a list of sub-directories of the current directory in the\nform \"dbi:CSV:directory=$dirname\".\n\nIf you want to read the sub-directories of another directory, use\n\nmy $drh  = DBI->installdriver (\"CSV\");\nmy @list = $drh->datasources (fdir => \"/usr/local/csvdata\");\n\nlisttables\nThis method returns a list of file-names inside $dbh->{directory}. Example:\n\nmy $dbh  = DBI->connect (\"dbi:CSV:directory=/usr/local/csvdata\");\nmy @list = $dbh->func (\"listtables\");\n\nNote that the list includes all files contained in the directory, even those that have\nnon-valid table names, from the view of SQL. See \"Creating and dropping tables\" above.\n"
                }
            ]
        },
        "KNOWN ISSUES": {
            "content": "*   The module is using flock () internally. However, this function is not available on some\nplatforms. Use of flock () is disabled on MacOS and Windows 95: There's no locking at all\n(perhaps not so important on these operating systems, as they are for single users anyways).\n",
            "subsections": []
        },
        "TODO": {
            "content": "Tests\nAim for a full 100% code coverage\n\n- eol      Make tests for different record separators.\n- csvxs   Test with a variety of combinations for\nsepchar, quotechar, and escapechar testing\n- quoting  $dbh->do (\"drop table $\") for DBI-tables ();\n- errors   Make sure that all documented exceptions are tested.\n. write to write-protected file\n. read from badly formatted csv\n. pass bad arguments to csv parser while fetching\n\nAdd tests that specifically test DBD::File functionality where that is useful.\n\nRT  Attack all open DBD::CSV bugs in RT\n\nCPAN::Forum\nAttack all items in http://www.cpanforum.com/dist/DBD-CSV\n\nDocumentation\nExpand on error-handling, and document all possible errors. Use Text::CSVXS::errordiag ()\nwherever possible.\n\nDebugging\nImplement and document dbdverbose.\n\nData dictionary\nInvestigate the possibility to store the data dictionary in a file like .sys$columns that\ncan store the field attributes (type, key, nullable).\n\nExamples\nMake more real-life examples from the docs in examples/\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "DBI, Text::CSVXS, SQL::Statement, DBI::SQL::Nano\n\nFor help on the use of DBD::CSV, see the DBI users mailing list:\n\nhttp://lists.cpan.org/showlist.cgi?name=dbi-users\n\nFor general information on DBI see\n\nhttp://dbi.perl.org/ and http://faq.dbi-support.com/\n\nAUTHORS and MAINTAINERS\nThis module is currently maintained by\n\nH.Merijn Brand <h.m.brand@xs4all.nl>\n\nin close cooperation with and help from\n\nJens Rehsack <sno@NetBSD.org>\n\nThe original author is Jochen Wiedmann. Previous maintainer was Jeff Zucker\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "Copyright (C) 2009-2023 by H.Merijn Brand Copyright (C) 2004-2009 by Jeff Zucker Copyright (C)\n1998-2004 by Jochen Wiedmann\n\nAll rights reserved.\n\nYou may distribute this module under the terms of either the GNU General Public License or the\nArtistic License, as specified in the Perl README file.\n",
            "subsections": []
        }
    },
    "summary": "DBD::CSV - DBI driver for CSV files",
    "flags": [],
    "examples": [],
    "see_also": []
}