in reply to Re: newbie wants to install DBI for ActiveState
in thread newbie wants to install DBI for ActiveState

Both of your responses were correct. Thanks. Once I simply used ppm, I could install the DBD-ODBC module without incident. I can now access my database fine.

However, when I execute the following code:

#!/usr/bin/perl -w use DBI; my @drivers = DBI->available_drivers; die 'no drivers installed' unless @drivers; for my $driver (@drivers) { print "driver:\t$driver\n"; my @dsns = DBI->data_sources($driver); for my $dsn (@dsns) { print "dsn:\t$dsn\n"; } }

I get the following output:

C:\Perl\source>perl dbtest.pl driver: ExampleP dsn: dbi:ExampleP:dir=. driver: ODBC dsn: DBI:ODBC:MS Access Database dsn: DBI:ODBC:Excel Files dsn: DBI:ODBC:dBASE Files dsn: DBI:ODBC:Visual FoxPro Tables dsn: DBI:ODBC:Visual FoxPro Database dsn: DBI:ODBC:testdb driver: Proxy install_driver(Proxy) failed: Can't locate RPC/PlClient.pm in @INC (@I +NC contain s: C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/DBD/Proxy.pm li +ne 28. BEGIN failed--compilation aborted at C:/Perl/site/lib/DBD/Proxy.pm lin +e 28. Compilation failed in require at (eval 3) line 3. Perhaps a module that DBD::Proxy requires hasn't been fully installed at dbtest.pl line 10 C:\Perl\source>

Any ideas on what's going on with the Proxy driver? Should I be concerned about this?

Replies are listed 'Best First'.
Re: Re: Re: newbie wants to install DBI for ActiveState
by jasonk (Parson) on Sep 16, 2003 at 22:06 UTC

    If you don't need the DBD::Proxy driver then you shouldn't be concerned, but if you do you can just use ppm to install the RPC::PlClient package as well and solve the problem.


    We're not surrounded, we're in a target-rich environment!
Re: Re: Re: newbie wants to install DBI for ActiveState
by shenme (Priest) on Sep 17, 2003 at 01:24 UTC
    You are asking DBI what drivers it knows about.   You are then asking each driver what data sources it knows about.   But to ask each driver for that information, DBI has to load the module for each driver.   At that point you discovered that DBD::Proxy had some dependencies you hadn't installed yet.   As jasonk said, this isn't really a problem unless you _really_ wanted to use the Proxy driver.

    I added a couple lines to your code to skip trying to load module DBD::Proxy and ran the loops to completion:

    print "driver:\t$driver\n"; if( $driver eq 'Proxy' ) { print " skipping polling DSN's for Proxy driver.\n"; next; }
    The output (on my system) was:
    driver: CSV
    dsn:    DBI:CSV:f_dir=test1
    driver: Chart
    driver: ExampleP
    dsn:    dbi:ExampleP:dir=.
    driver: File
    dsn:    DBI:File:f_dir=test1
    driver: ODBC
    dsn:    DBI:ODBC:dBASE Files
    dsn:    DBI:ODBC:Excel Files
    dsn:    DBI:ODBC:MS Access Database
    driver: Proxy
      skipping polling DSN's for Proxy driver.
    driver: SQLite
    driver: mysql
    dsn:    DBI:mysql:mysql
    dsn:    DBI:mysql:mytest
    dsn:    DBI:mysql:test