in reply to Cant locate DBI in @INC

If nothing changed in your script, then something changed in your environment. As almut has already pointed out, even a few weeks ago the push (@INC, "D:\\Perl\\site\\lib"); line had no effect since it was being executed after the use DBI statement. Previously, "D:\\Perl\\site\\lib" was already in @INC when your script began. Now it is no longer present.

In addition to the fix that almut has suggested (moving push (@INC, "D:\\Perl\\site\\lib"); into a BEGIN {...} block placed before use DBI you might want to look more closely at your environment to see what changed. Look particularly for changes in PATH, PERL5LIB, PERLLIB environment variables. Also if perl is running inside of a .bat file with command line switches, look for changes in the values passed to the -I argument. It is possible that other scripts you have written will have been affected by whatever changed. See perlrun for more information about what contributes to the value of @INC when your script runs.

Best, beth

Replies are listed 'Best First'.
Re^2: Cant locate DBI in @INC
by Irishboy24 (Sexton) on Sep 17, 2009 at 16:44 UTC

    Thank you monks for all the replies. i guess the only plausible solution now for me is to reinstall the DBI module from CPAN. i will be on it.