Re: problem using a module
- From: wiggins@xxxxxxxxxxxx (Wiggins d'Anconia)
- Date: Fri, 28 Oct 2005 13:49:49 -0600
jm wrote:
> i'm modifying a script to run on a sun box that i do not have
> privileges to install modules in the normal perl paths. subsequently
> i installed DBI.pm into a modules subdir under my home dir. below are
> the 2 relevant lines:
>
>
> use lib "$ENV{HOME}/modules/DBI";
>
> our $mysql_dbh = DBI->connect("DBI:mysql:host=x.x.x.x", "user",
> "password", {RaiseError => 1});
>
>
> this is the error msg i get:
>
> Can't modify subroutine entry in scalar assignment at ./ca-cisco line
> 64, near ");"
>
> line 64 being the "our $mysql_dbh..." line (yes the host is a valid ip address).
>
> this does work on a linux box with DBI installed in the standard
> location, so what do i need to do to get this to work where DBI is
> recognized by the script but not in the normal location?
That seems like a very odd error. One thing I do notice is that you are
including "DBI" in the path to 'use lib'. This would have to mean that
the DBI module lives in "$ENV{HOME}/modules/DBI/DBI.pm". Is that the
case? Or should your use lib line just be "$ENV{HOME}/modules"??
HTH,
http://danconia.org
> --
> since this is a gmail account, please verify the mailing list is
> included in the reply to addresses
>
.
- References:
- problem using a module
- From: Jm
- problem using a module
- Prev by Date: problem using a module
- Next by Date: <> tag in perl
- Previous by thread: problem using a module
- Next by thread: Re: problem using a module
- Index(es):
Relevant Pages
|
|