[Hampshire] Fw: Re: Perl modules, how do I know I have them…

Top Page

Reply to this message
Author: Isaac Close
Date:  
To: Hampshire
Subject: [Hampshire] Fw: Re: Perl modules, how do I know I have them??



--- On Tue, 13/1/09, Isaac Close <isaacclose@???> wrote:

> From: Isaac Close <isaacclose@???>
> Subject: Re: [Hampshire] Perl modules, how do I know I have them??
> To: lug@???
> Date: Tuesday, 13 January, 2009, 9:06 AM
> --- On Tue, 13/1/09, Vic <lug@???> wrote:
>
> > From: Vic <lug@???>
> > Subject: Re: [Hampshire] Perl modules, how do I know I
> have them??
> > To: "Hampshire LUG Discussion List"
> <hampshire@???>
> > Date: Tuesday, 13 January, 2009, 7:57 AM
> > > DBI and DBD::mysql
> > >
> > > How do I check that these are installed? I am
> running
> > Mepis 8 RC1 (which
> > > is based on Debian Lenny).
> >
> > The easiest way to see if they are on your system is
> just
> > to try to use them:
> >
> > perl -e "use DBI"
> > perl -e "use DBD::mysql"
> >
> > If you get "Can't locate ..." errors,
> you
> > haven't got them.
> >
>
> The following doesn't directly answer your question but
> worth noting :
>
> Sometimes, modules are installed in a path that Perl is not
> aware of (because they are not in @INC) and thus Perl will
> return an error if you try to 'use' them. (This is
> sometimes the case with non-standard installation).
>
> If you know where they reside but still Perl returns an
> error, do :
>
> use lib "/path/to/modules/";
>
> Or, if you want to append the path to @INC at the start of
> execution :
>
> BEGIN {
>    push(@INC, '/path/to/modules/";
> }

>
> You may then 'use' those modules at will.
>
>
> Isaac.