@INC is an array of directories - exactly like the PATH variable. Use the UNIX find command to locate the DBI.pm files. add the driectory to @INC this way:
Code:
the PERLLIB environment variable
$ export PERLLIB=/path/to/my/dir
$ perl program.pl
the PERL5LIB environment variable
$ export PERL5LIB=/path/to/my/dir
$ perl program.pl
the perl -Idir command line flag
$ perl -I/path/to/my/dir program.pl
the lib pragma:
use lib "$ENV{HOME}/myown_perllib";
the local::lib module:
use local::lib;
use local::lib "~/myown_perllib";
We ran into an issue trying to install DBI and DB2 modules for perl for AIX from the link
http://www-306.ibm.com/software/data/db2/perl/
We tried to install the DBI module using
bash# perl -MCPAN -e 'install DBI'
command. However we ended up with the following error.
Stop.
... (3 Replies)
hi i am trying to connect to an oracle database using dbi and i get this ::
Driver has not implemented the disconnect_all method. at /opt/perl/lib/site_perl/5.8.0/sun4-solaris/DBI.pm line 575
END failed--call queue aborted.
for all i know, the script was working earlier, but has... (1 Reply)
Hi, i have some queries on installing the Perl DBI and the DBD Oracle.
I know that i have to install the DBI first. I have the source files in a folder in my home directory.The commands to install arecd /home/DBI
Perl Makefile.PL
make
make installI would like to know, after executing these... (4 Replies)
Hello !
I am working on a small Perl script that should connect to the MySQL server, will select all the databases one by one and do some queryes on each. I started working on it but I just saw that on the DBI manual page there's no method for changing the working database. Am I missing... (2 Replies)
Hi,
I want to connect perl with the mysql to select and so on but the connection don't work
code
#!/usr/bin/perl
BEGIN {
# PERL MODULES WE WILL BE USING
use DBI;
$dbh = DBI->connect('DBI:mysql:C:\Program Files\MySQL\MySQL Server 5.0\data\db1','','pass') or die $DBI::errstr;}
#... (1 Reply)
i've been struggling with installing the Perl DBI & DBD modules all weekend, and I'm getting close, but no cigar as of yet. When I run the perl script db.pl I get the following mismatch error:
Mon Apr 19 09:43:29 EDT 2010
/Library/Perl/DBD-mysql-4.011 ->
peterv@MBP17.local<515>$: db.pl | tee... (0 Replies)
Hi there, I have a bit of code similar to below (which ive actually got from perldoc, but mine is similar enough)
$sth = $dbh->prepare(q{ SELECT region, sales FROM sales_by_region });
$sth->execute;
my ($region, $sales);
# Bind Perl variables to columns:
$rv =... (4 Replies)
Hi Guys,
I wonder if possible to execute a Db2 commands within a perl scripts without installing or invoking the DBI modules. I have a script that is written in kron shell and it looks like :
DB=`db2 list db directory | egrep "Database alias|Directory entry type"|awk '{printf $0 ;... (0 Replies)
Hi All,
I installed DBI module in a non INC location and using it in my script via "use lib".
But it throw the below error at the "use DBI" step.
Please help
Usage: DBI::_install_method(dbi_class, meth_name, file, attribs=Nullsv) at /xx/xxx/xxxxx/xxxxx/oracle/lib/DBI.pm/oracle/lib/DBI.pm line... (2 Replies)
Experts,
I've been struggling with making a Perl Oracle DBI script to work through my Apache webserver.
Mysql DBI scripts work fine, but I'm having issue's with Oracle.
The oracle script works on command line, but I'm getting an
"Internal Server Error" with apache
Sourcing the oracle... (0 Replies)
Discussion started by: timj123
0 Replies
LEARN ABOUT DEBIAN
pod::webserver
Pod::Webserver(3pm) User Contributed Perl Documentation Pod::Webserver(3pm)NAME
Pod::Webserver -- minimal web server to serve local Perl documentation
SYNOPSIS
% podwebserver
You can now point your browser at http://localhost:8020/
DESCRIPTION
This module can be run as an application that works as a minimal web server to serve local Perl documentation. It's like perldoc except it
works through your browser.
Run podwebserver -h for a list of runtime options.
SECURITY (AND @INC)
Pod::Webserver is not what you'd call a gaping security hole -- after all, all it does and could possibly do is serve HTML versions of
anything you could get by typing "perldoc SomeModuleName". Pod::Webserver won't serve files at arbitrary paths or anything.
But do consider whether you're revealing anything by basically showing off what versions of modules you've got installed; and also consider
whether you could be revealing any proprietary or in-house module documentation.
And also consider that this exposes the documentation of modules (i.e., any Perl files that at all look like modules) in your @INC dirs --
and your @INC probably contains "."! If your current working directory could contain modules whose Pod you don't want anyone to see, then
you could do two things: The cheap and easy way is to just chdir to an uninteresting directory:
mkdir ~/.empty; cd ~/.empty; podwebserver
The more careful approach is to run podwebserver under perl in -T (taint) mode (as explained in perlsec), and to explicitly specify what
extra directories you want in @INC, like so:
perl -T -Isomepath -Imaybesomeotherpath -S podwebserver
You can also use the -I trick (that's a capital "igh", not a lowercase "ell") to add dirs to @INC even if you're not using -T. For
example:
perl -I/that/thar/Module-Stuff-0.12/lib -S podwebserver
An alternate approach is to use your shell's environment-setting commands to alter PERL5LIB or PERLLIB before starting podwebserver.
These -T and -I switches are explained in perlrun. But I'll note in passing that you'll likely need to do this to get your PERLLIB
environment variable to be in @INC...
perl -T -I$PERLLIB -S podwebserver
(Or replacing that with PERL5LIB, if that's what you use.)
ON INDEXING '.' IN @INC
Pod::Webserver uses the module Pod::Simple::Search to build the index page you see at http://yourservername:8020/ (or whatever port you
choose instead of 8020). That module's indexer has one notable DWIM feature: it reads over @INC, except that it skips the "." in @INC. But
you can work around this by expressing the current directory in some other way than as just the single literal period -- either as some
more roundabout way, like so:
perl -I./. -S podwebserver
Or by just expressing the current directory absolutely:
perl -I`pwd` -S podwebserver
Note that even when "." isn't indexed, the Pod in files under it are still accessible -- just as if you'd typed "perldoc whatever" and got
the Pod in ./whatever.pl
SEE ALSO
This module is implemented using many CPAN modules, including: Pod::Simple::HTMLBatch Pod::Simple::HTML Pod::Simple::Search Pod::Simple
See also Pod::Perldoc and <http://search.cpan.org/>
COPYRIGHT AND DISCLAIMERS
Copyright (c) 2004-2006 Sean M. Burke. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
AUTHOR
Original author: Sean M. Burke "sburke@cpan.org"
Maintained by: Allison Randal "allison@perl.org"
perl v5.10.0 2008-01-09 Pod::Webserver(3pm)