简单地说,当我在macOS High Sierra上使用DBD :: SQLite时,我得到了大量的虚假"子程序...重新定义"错误。
如果我使用此代码并在我的iMac或MacBook Pro上运行(均运行10.13.3 High Sierra)......
#!/usr/bin/perl -w
use DBI;
use DBD::sqlite;
$db_file = "./anything.db";
$dbh = DBI->connect("dbi:SQLite:dbname=$db_file","","");
$dbh->disconnect();
它产生了这个:
Constant subroutine DBD::SQLite::NEWAPI redefined at /System/Library/Perl/5.18/constant.pm line 140.
Subroutine driver redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 31.
Subroutine CLONE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 73.
Subroutine connect redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 80.
Subroutine install_collation redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 160.
Subroutine regexp redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 178.
Subroutine prepare redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 186.
Subroutine do redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 200.
Subroutine ping redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 219.
Subroutine _get_version redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 230.
Subroutine get_info redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 240.
Subroutine _attached_database_list redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 247.
Subroutine table_info redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 262.
Subroutine primary_key_info redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 378.
Subroutine foreign_key_info redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 536.
Subroutine statistics_info redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 636.
Subroutine type_info_all redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 704.
Subroutine column_info redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 766.
Subroutine TIEHASH redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 885.
Subroutine STORE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 889.
Subroutine DELETE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 894.
Subroutine DBD::SQLite::db::sqlite_last_insert_rowid redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::last_insert_rowid redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_create_function redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::create_function redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_enable_load_extension redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::enable_load_extension redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::load_extension redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_load_extension redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::create_aggregate redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_create_aggregate redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_create_collation redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::create_collation redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::collation_needed redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_collation_needed redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_progress_handler redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::progress_handler redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_trace redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_profile redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::profile redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::commit_hook redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_commit_hook redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::rollback_hook redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_rollback_hook redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::update_hook redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_update_hook redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_set_authorizer redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::set_authorizer redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::busy_timeout redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_busy_timeout redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_backup_from_file redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::backup_from_file redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::backup_to_file redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_backup_to_file redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::table_column_metadata redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_table_column_metadata redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_db_filename redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::db_filename redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::register_fts3_perl_tokenizer redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_register_fts3_perl_tokenizer redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::sqlite_db_status redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::db_status redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::sqlite_st_status redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::st_status redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::compile_options redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::sqlite_status redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::OK redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DENY redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::IGNORE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_INDEX redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_TABLE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_TEMP_INDEX redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_TEMP_TABLE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_TEMP_TRIGGER redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_TEMP_VIEW redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_TRIGGER redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_VIEW redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DELETE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_INDEX redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_TABLE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_TEMP_INDEX redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_TEMP_TABLE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_TEMP_TRIGGER redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_TEMP_VIEW redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_TRIGGER redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_VIEW redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::INSERT redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::PRAGMA redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::READ redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::SELECT redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::TRANSACTION redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::UPDATE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::ATTACH redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DETACH redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::ALTER_TABLE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::REINDEX redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::ANALYZE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::CREATE_VTABLE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::DROP_VTABLE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::FUNCTION redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::SAVEPOINT redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::dr::dbixs_revision redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::dr::discon_all_ redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::dr::disconnect_all redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::_login redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::selectall_arrayref redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::selectrow_array redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::selectrow_arrayref redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::last_insert_id redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::commit redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::rollback redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::disconnect redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::STORE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::FETCH redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::db::DESTROY redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::_prepare redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::rows redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::bind_col redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::bind_param redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::bind_param_inout redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::execute redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::fetchrow_arrayref redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::fetch redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::fetchrow_array redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::fetchrow redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::fetchall_arrayref redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::finish redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::blob_read redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::STORE redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::FETCH_attrib redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::FETCH redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
Subroutine DBD::SQLite::st::DESTROY redefined at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm line 17.
如果我添加代码来在数据库中执行操作,操作会成功,如果我删除-w则不会出现错误。但我喜欢我的代码是" -w clean"。
我对此有点不知所措。这些确实是DBD :: SQLite的来源地。我在/ usr / bin / perl使用系统perl:
$ ls -l /usr/bin/perl
-rwxr-xr-x 1 root wheel 66608 Dec 1 12:45 /usr/bin/perl
$ file /usr/bin/perl
/usr/bin/perl: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [i386:Mach-O executable i386]
/usr/bin/perl (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/perl (for architecture i386): Mach-O executable i386
我在两个系统上都使用过自制程序,但在/ System和/ usr / bin / perl -V中都没有写入:
@INC:
/Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/Network/Library/Perl/5.18
/Library/Perl/Updates/5.18.2/darwin-thread-multi-2level
/Library/Perl/Updates/5.18.2
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18
.
(不,我目前的目录中没有任何模块)。
DBD :: SQLite在/ System:
中$ ll /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm
-rw-r--r-- 1 root wheel 87746 Jul 27 2013 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm
对于它的价值,字符串DBD,SQLite和NEWAPI甚至不会出现在/System/Library/Perl/5.18/constants.pm中: - (
盒子上只有一个SQLite.pm:
$ locate SQLite|grep DBD
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/man3/DBD::SQLite.3pm
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/man3/DBD::SQLite5.18.3pm
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/man3/DBD::SQLite::Cookbook.3pm
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/man3/DBD::SQLite::Cookbook5.18.3pm
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite/Cookbook.pod
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DBD/SQLite.pm
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBD/SQLite
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBD/SQLite/SQLite.bs
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBD/SQLite/SQLite.bundle
我通常的调试方法 - 在StackOverflow中输入详细的帖子,并通过忏悔调试自己解决问题似乎失败了。有什么想法吗?
答案 0 :(得分:10)
您不需要use
DBD模块。当您致电DBI->connect
时,DBI会自动加载它。删除多余的use
会使您的错误无效。
详细信息:在大多数操作系统上,use DBD::sqlite
将失败 - 模块实际上称为DBD::SQLite
(大写“SQL”)。它在macOS上成功,因为文件系统不区分大小写,因此可以使用任一名称加载模块;但是,这会导致DBI第二次加载它。