Re: problem using a module



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
>
.



Relevant Pages

  • problem using a module
    ... 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. ...
    (perl.beginners)
  • Re: Deploying Office 07 with Group Policy
    ... computer I tested it on took 30 minutes to install. ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ...
    (microsoft.public.office.setup)
  • Re: [opensuse] Editting PATH variable
    ... SuSEconfig script ... ... not knowing what you options you used to install ... If your unfamiliar with Bash a good book is 'Learning the Bash Shell' by ... For Java use editing the PATH variable is NOT required... ...
    (SuSE)
  • Re: trusted sites
    ... Script Debugging Problem ... checks whether the browser can handle Shockwave Flash so I suspect there may ... There is good information concerning all aspects of the Java situation here: ... Sun also offers an automatic download and install of the 1.4 Java plug-in ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: KB911280 update problem
    ... Microsoft is working on an amended patch which will address this issue. ... Microsoft advises anyone affected by this to not install the patch and to ... That script is broken by the patch. ... He said he could not write a bug report ...
    (microsoft.public.windowsupdate)