use lib "." [was Re: [Israel.pm] Classifier]
Shlomi Fish
shlomif at iglu.org.il
Tue Jun 8 00:23:49 PDT 2004
On Tuesday 08 June 2004 10:17, Offer Kaye wrote:
> > Hello,
> >
> > I've been implementing today a very simple, yet very useful
> > classification algorithm(s):
> > Perceptron
> > and
> > Winnow
>
> [...snip...]
>
> > Any comments?
> >
> > --
> > Shlomo Yona
>
> Just a couple of comments:
> 1. In the example.perl code, there is no need to do "use lib './';", since
> "." is already in @INC by default.
Right, but just note that sometimes the statement "use lib '.';" can be
useful. While "." is already in @INC, it's usuaully the last element. use lib
prepends the path (in our case ".") to @INC and so now, the modules at the
local dir are used before the ones at the more global paths. (instead of the
opposite).
So, if you want to override some modules that are already found in your
system, you need to use this statement or something similar. I found the need
to use it for a web-application I wrote for a server I'm co-admining.
But excuse me, I now need to hide so that the Perl gestapo won't hunt me down
and execute me.
Regards,
Shlomi Fish
--
---------------------------------------------------------------------
Shlomi Fish shlomif at iglu.org.il
Homepage: http://shlomif.il.eu.org/
Quidquid latine dictum sit, altum viditur.
[Whatever is said in Latin sounds profound.]
More information about the Perl
mailing list