PERL操作程序五十六(Perl modules安装设定关联)

返回
install_driver(mysql) failed: Unable to get DBI state function. DBI not loaded. at C:/Perl/lib/DynaLoader.pm line 214. Compilation failed in require at (eval 5) line 3. DynaLoader.pm sub bootstrap { #214 &$xs(@args); } ppm> install 30 Downloading DBD-mysql-4.021...done Unpacking DBD-mysql-4.021...done Generating HTML for DBD-mysql-4.021...done Updating files in site area...done 12 files unchanged ---------------------------------------------------------- msc.pm修改如下 # $self->tmpl_path($self->cfg('template_dir')); $self->tmpl_path('tmpl/'); $self->dbh_config("DBI:mysql:host=localhost;database=cookbook","cbuser","cbpass"); 新的错误==> D:\www\cgi-bin>perl msc_start.cgi Error executing class callback in prerun stage: install_driver(mysql) failed: Unable to get DBI state function. DBI not loaded. at C:/Perl/lib/DynaLoader.pm line 214. Compilation failed in require at (eval 15) line 3. at C:/Perl/site/lib/CGI/Application/Plugin/DBH.pm line 42
#!C:/perl/bin/perl -w use msc; my $webapp = msc->new(); $webapp->cfg_file('config.cfg'); $webapp->header_add(-charset => 'UTF-8'); $webapp->run(); config.cfg $cfg{template_dir} = 'tmpl/'; \%cfg; D:\www\cgi-bin>perl msc_start.cgi Error executing class callback in prerun stage: Config::Auto couldn't parse perl data: Global symbol "%cfg" requires explicit package name at (eval 16) line 15, <$fh> line 11. Global symbol "%cfg" requires explicit package name at (eval 16) line 19, <$fh> line 11. at C:/Perl/site/lib/CGI/Application/Plugin/ConfigAuto.pm line 171 NAME CGI::Application - Framework for building reusable web-applications 旧版本 package CGI::Application::Plugin::ConfigAuto; $VERSION = '1.10'; 新版本 package CGI::Application::Plugin::ConfigAuto; our $VERSION = '1.33';
C:\Users\msc>ppm-shell ppm 4.14 (ActivePerl 1402) Copyright (C) 2011 ActiveState Software Inc. All rights reserved. ppm> install CGI-Application-Plugin-ConfigAuto Downloading CGI-Application-Plugin-ConfigAuto-1.33...done Downloading CGI-Application-4.50...done Downloading Config-Auto-0.42...done Downloading Class-ISA-0.36...done Downloading Config-IniFiles-2.77...done Downloading YAML-0.84...done Unpacking CGI-Application-Plugin-ConfigAuto-1.33...done Unpacking CGI-Application-4.50...done Unpacking Config-Auto-0.42...done Unpacking Class-ISA-0.36...done Unpacking Config-IniFiles-2.77...done Unpacking YAML-0.84...done Generating HTML for CGI-Application-Plugin-ConfigAuto-1.33...done Generating HTML for CGI-Application-4.50...done Generating HTML for Config-Auto-0.42...done Generating HTML for Class-ISA-0.36...done Generating HTML for Config-IniFiles-2.77...done Generating HTML for YAML-0.84...done Updating files in site area...done 37 files installed ppm> install CGI-Application-Plugin-DBH Downloading CGI-Application-Plugin-DBH-4.00...done Downloading DBD-Mock-1.43...done Unpacking CGI-Application-Plugin-DBH-4.00...done Unpacking DBD-Mock-1.43...done Generating HTML for CGI-Application-Plugin-DBH-4.00...done Generating HTML for DBD-Mock-1.43...done Updating files in site area...done 12 files installed ppm> install DBD-mysql Downloading DBD-mysql-4.021...done Unpacking DBD-mysql-4.021...done Generating HTML for DBD-mysql-4.021...done Updating files in site area...done 12 files installed ppm> install Jcode Downloading Jcode-2.07...done Unpacking Jcode-2.07...done Generating HTML for Jcode-2.07...done Updating files in site area...done 4 files installed ppm> install SQL-Abstract Downloading SQL-Abstract-1.73...done Downloading Class-Accessor-Grouped-0.10006...done Downloading Hash-Merge-0.12...done Downloading Test-Warn-0.24...done Downloading Getopt-Long-Descriptive-0.092...done Downloading Class-Inspector-1.27...done Downloading Class-XSAccessor-1.13...done Downloading Tree-DAG_Node-1.06...done Downloading Params-Validate-1.06...done Downloading Module-Implementation-0.05...done Downloading Module-Runtime-0.013...done Unpacking SQL-Abstract-1.73...done Unpacking Class-Accessor-Grouped-0.10006...done Unpacking Hash-Merge-0.12...done Unpacking Test-Warn-0.24...done Unpacking Getopt-Long-Descriptive-0.092...done Unpacking Class-Inspector-1.27...done Unpacking Class-XSAccessor-1.13...done Unpacking Tree-DAG_Node-1.06...done Unpacking Params-Validate-1.06...done Unpacking Module-Implementation-0.05...done Unpacking Module-Runtime-0.013...done Generating HTML for SQL-Abstract-1.73...done Generating HTML for Class-Accessor-Grouped-0.10006...done Generating HTML for Hash-Merge-0.12...done Generating HTML for Test-Warn-0.24...done Generating HTML for Getopt-Long-Descriptive-0.092...done Generating HTML for Class-Inspector-1.27...done Generating HTML for Class-XSAccessor-1.13...done Generating HTML for Tree-DAG_Node-1.06...done Generating HTML for Params-Validate-1.06...done Generating HTML for Module-Implementation-0.05...done Generating HTML for Module-Runtime-0.013...done Updating files in site area...done 53 files installed ppm> install Time-Piece-MySQL Downloading Time-Piece-MySQL-0.06...done Unpacking Time-Piece-MySQL-0.06...done Generating HTML for Time-Piece-MySQL-0.06...done Updating files in site area...done 2 files installed ppm> install CGI-Application-Plugin-ValidateRM Downloading CGI-Application-Plugin-ValidateRM-2.5...done Downloading HTML-FillInForm-2.1...done Downloading Data-FormValidator-4.70...done Downloading Email-Valid-0.190...done Downloading Image-Size-3.232...done Downloading MIME-Types-1.35...done Downloading Perl6-Junction-1.40000...done Downloading Regexp-Common-2011121001...done Downloading File-MMagic-1.29...done Downloading Net-DNS-0.68...done Downloading MailTools-2.09...done Downloading enum-1.016...done Downloading Win32-IPHelper-0.08...done Downloading TimeDate-1.20...done Unpacking CGI-Application-Plugin-ValidateRM-2.5...done Unpacking HTML-FillInForm-2.1...done Unpacking Data-FormValidator-4.70...done Unpacking Email-Valid-0.190...done Unpacking Image-Size-3.232...done Unpacking MIME-Types-1.35...done Unpacking Perl6-Junction-1.40000...done Unpacking Regexp-Common-2011121001...done Unpacking File-MMagic-1.29...done Unpacking Net-DNS-0.68...done Unpacking MailTools-2.09...done Unpacking enum-1.016...done Unpacking Win32-IPHelper-0.08...done Unpacking TimeDate-1.20...done Generating HTML for CGI-Application-Plugin-ValidateRM-2.5...done Generating HTML for HTML-FillInForm-2.1...done Generating HTML for Data-FormValidator-4.70...done Generating HTML for Email-Valid-0.190...done Generating HTML for Image-Size-3.232...done Generating HTML for MIME-Types-1.35...done Generating HTML for Perl6-Junction-1.40000...done Generating HTML for Regexp-Common-2011121001...done Generating HTML for File-MMagic-1.29...done Generating HTML for Net-DNS-0.68...done Generating HTML for MailTools-2.09...done Generating HTML for enum-1.016...done Generating HTML for Win32-IPHelper-0.08...done Generating HTML for TimeDate-1.20...done Updating files in site area...done 309 files installed
返回