Re: @INC [SOLVED]

2011-09-26 Thread Rob Dixon
On 26/09/2011 17:26, Uri Guttman wrote: but you still asked why @INC didn't load the module. it wasn't a LOADING issue at all. you never eliminated that logic branch and so most of the effort was wasted on why @INC wasn't working. you never mentioned File::Find until much lat

Re: @INC [SOLVED]

2011-09-26 Thread Uri Guttman
>>>>> "MM" == Mike McClain writes: MM> On Sat, Sep 24, 2011 at 02:45:20PM -0400, Uri Guttman wrote: MM> >> >> On Sep 23, 2011 1:00 AM, "Mike McClain" wrote: >> >> > On my system @INC doesn't include /usr/

Re: @INC [SOLVED]

2011-09-26 Thread Mike McClain
On Sat, Sep 24, 2011 at 02:45:20PM -0400, Uri Guttman wrote: > >> On Sep 23, 2011 1:00 AM, "Mike McClain" wrote: > >> > On my system @INC doesn't include /usr/share/perl/5.8.8/ > >> > even though there are nearly 1000 files there

Re: @INC [SOLVED]

2011-09-24 Thread Uri Guttman
>>>>> "MM" == Mike McClain writes: MM> On Fri, Sep 23, 2011 at 01:36:33AM -0400, shawn wilson wrote: >> On Sep 23, 2011 1:00 AM, "Mike McClain" wrote: >> > >> > On my system @INC doesn't include /usr/share/perl/5.8.

Re: @INC [SOLVED]

2011-09-24 Thread Mike McClain
On Fri, Sep 23, 2011 at 01:36:33AM -0400, shawn wilson wrote: > On Sep 23, 2011 1:00 AM, "Mike McClain" wrote: > > > > On my system @INC doesn't include /usr/share/perl/5.8.8/ > > even though there are nearly 1000 files there. > > Can anybody tell me whe

Re: @INC

2011-09-22 Thread Paul Johnson
On Fri, Sep 23, 2011 at 01:36:33AM -0400, shawn wilson wrote: > On Sep 23, 2011 1:00 AM, "Mike McClain" wrote: > > > > On my system @INC doesn't include /usr/share/perl/5.8.8/ > > even though there are nearly 1000 files there. > > Can anybody tell me whe

Re: @INC

2011-09-22 Thread shawn wilson
On Sep 23, 2011 1:00 AM, "Mike McClain" wrote: > > On my system @INC doesn't include /usr/share/perl/5.8.8/ > even though there are nearly 1000 files there. > Can anybody tell me where @INC is set. > Compile time IIRC. Where did that perl come from? Ie, if its fro

@INC

2011-09-22 Thread Mike McClain
On my system @INC doesn't include /usr/share/perl/5.8.8/ even though there are nearly 1000 files there. Can anybody tell me where @INC is set. mike@/deb40a:~/perl> perl -v This is perl, v5.8.8 built for i486-linux-gnu-thread-multi Thanks, Mike -- Satisfied user of Linux since 1997.

Re: @INC problem with ssh

2011-04-07 Thread Dermot
; ... >> >> >> On host A I run a script that does: >> >> >> use FindBin qw($Bin); >> >> use lib qq($Bin/../lib); >> >> ... >> >> ... >> >> ... >> >> my $cmd = qq(ssh -i $Bin/../lib/.ssh/someuser_id.rsa someuser\@) . >>

Re: @INC problem with ssh

2011-04-07 Thread C.DeRykus
use FindBin qw($Bin); > >> use lib qq($Bin/../lib); > >> ... > >> ... > >> ... > >> my $cmd = qq(ssh -i $Bin/../lib/.ssh/someuser_id.rsa someuser\@) . > >>             $self->config('imageing_server') . > >>             qq( "/usr/local

Re: @INC problem with ssh

2011-04-07 Thread Dermot
        $self->config('imageing_server') . >>             qq( "/usr/local/bin/stuff.pl "); >> my $res = qx($cmd); >> >> When I run the script, I get: >> Can't locate MyApp/Schema.pm in @INC (@INC contains: >> /usr/local/bin/../../ /e

Re: @INC problem with ssh

2011-04-06 Thread C.DeRykus
); > use lib qq($Bin/../lib); > ... > ... > ... > my $cmd = qq(ssh -i $Bin/../lib/.ssh/someuser_id.rsa someuser\@) . >             $self->config('imageing_server') . >             qq( "/usr/local/bin/stuff.pl "); > my $res = qx($cmd); > > When I

@INC problem with ssh

2011-04-06 Thread Dermot
g_server') . qq( "/usr/local/bin/stuff.pl "); my $res = qx($cmd); When I run the script, I get: Can't locate MyApp/Schema.pm in @INC (@INC contains: /usr/local/bin/../../ /etc/perl /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/

Re: can't locate loadable object for module PadWalker in @INC

2010-04-21 Thread Shlomi Fish
Hi Kenneth, On Wednesday 21 Apr 2010 08:19:25 CHAN, KENNETH 1 [AG/7721] wrote: > Thanks Fish. > "Fish" is my last name, so you should say "Thanks, Shlomi" or "Thanks, Mr. Fish" - not "Thanks, Fish". See what Joel Spolsky wrote about it here: http://www.joelonsoftware.com/articles/ResumeRead.ht

RE: can't locate loadable object for module PadWalker in @INC

2010-04-20 Thread CHAN, KENNETH 1 [AG/7721]
Thanks Fish. > Instead of going to all this trouble, you should probably use local::lib : > > http://search.cpan.org/dist/local-lib/ [CHAN] But the system doesn't have the local::lib module installed, I encountered the same problem in order to use local::lib. --

Re: can't locate loadable object for module PadWalker in @INC

2010-04-20 Thread Shlomi Fish
(http://search.cpan.org/CPAN/authors/id/R/RO/ROBIN/PadWalker-1.9.tar.gz > ) and 'tar -xvf' it to /bifx/perlModules. Added 'export > PERL5LIB=/bifx/perlModules' to my .profile file that will add the > /bifx/perlModules to @INC. I verified the path is actually in @INC by >

can't locate loadable object for module PadWalker in @INC

2010-04-20 Thread CHAN, KENNETH 1 [AG/7721]
vf' it to /bifx/perlModules. Added 'export PERL5LIB=/bifx/perlModules' to my .profile file that will add the /bifx/perlModules to @INC. I verified the path is actually in @INC by running this in linux shell: perl -e "print join(\"\n\", @INC)"; But eclipse complains that

Re: Changing @INC - related to my Date post ... :-) - something trivial I think

2010-01-22 Thread Shlomi Fish
On Friday 22 Jan 2010 13:07:13 newbie01 wrote: > Hi all. > > Am wanting to change the location of @INC to point to where some of > the date's pm files are. Can anyone please advise if it is possible to > have the use lib on a single line or is this not possible? > > #!

Changing @INC - related to my Date post ... :-) - something trivial I think

2010-01-22 Thread newbie01
Hi all. Am wanting to change the location of @INC to point to where some of the date's pm files are. Can anyone please advise if it is possible to have the use lib on a single line or is this not possible? #!/usr/bin/perl use lib '/oracle/product/10.2.0/perl/lib/site_perl/5.8.3/HTTP&

Re: remove directory from @INC

2009-11-28 Thread Huub van Niekerk
> > Well I have no idea if it will solve your problem, but try one of these; > > a. make a symbolic link between libssl.so.8 and libssl.so.10 b. or > simply copy libssl.so.10 as lbssl.so.8 > Thank you. Didn't think of "ln -s". That works now. -- To unsubscribe, e-mail: beginners-unsubscr...@

Re: remove directory from @INC

2009-11-28 Thread Owen
> Thank you for your answer. > > I changed the beginning of my code to this: > > #!/usr/bin/perl > no lib > "/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/"; > use lib "/usr/lib/perl5/5.10.0/i386-linux-thread-multi/"; > use DBI; > use strict; > use warnings; > use PostScript::Simpl

Re: remove directory from @INC

2009-11-28 Thread Huub van Niekerk
Thank you for your answer. I changed the beginning of my code to this: #!/usr/bin/perl no lib "/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/"; use lib "/usr/lib/perl5/5.10.0/i386-linux-thread-multi/"; use DBI; use strict; use warnings; use PostScript::Simple; No errors are given

Re: remove directory from @INC

2009-11-27 Thread Shawn H Corey
Huub van Niekerk wrote: > Hi, > > Sorry if this is the wrong group. > > Using Fedora Linux, due to system changes the path to the Perl modules > has changed. I've found that @INC contains the new path, but it's placed > after the old path. So now I'm ge

remove directory from @INC

2009-11-27 Thread Huub van Niekerk
Hi, Sorry if this is the wrong group. Using Fedora Linux, due to system changes the path to the Perl modules has changed. I've found that @INC contains the new path, but it's placed after the old path. So now I'm getting messages that modules can't be found in @INC anymore

Re: Can't locate HTML::Parser in @INC

2009-06-05 Thread Peter Nikolaidis
>> Any suggestions? > > What about file permissions? Does the user the test script was run as > have read access to > /usr/local/lib/perl5/site_perl/5.10.0/x86_64-linux/HTML/Parser.pm ? Hello, I just tried running the test script as root and got the same results, so I do not think it is a permis

Re: Can't locate HTML::Parser in @INC

2009-06-04 Thread Gunnar Hjalmarsson
Peter Nikolaidis wrote: I wrote a test script, which does nothing more than require HTML::Parser, and it fails with the following: catu...@www2:~$ perl test.plx Can't locate HTML::Parser in @INC (@INC contains: /usr/local/lib/perl5/5.10.0/x86_64-linux /usr/local/lib/perl5/5.10.0 /usr/

Can't locate HTML::Parser in @INC

2009-06-04 Thread Peter Nikolaidis
n't locate HTML::Parser in @INC (@INC contains: /usr/local/lib/perl5/5.10.0/x86_64-linux /usr/local/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.10.0 .) at test.plx line 3. If I do a search for HTML Parser, it does appear to be in the

Re: finding modules via @INC

2009-03-06 Thread Rob Dixon
dule name. This is from perldoc -f require, which is what 'use' employs to load the module: > If [the module] is a bareword, the require assumes a ".pm" > extension and > replaces "::" with "/" in the filename for you, to ma

Re: finding modules via @INC

2009-03-04 Thread Gunnar Hjalmarsson
::Module; C:\home>type MyModules\Module.pm package Some::Module; print "It worked!\n"; 1; C:\home>test.pl Can't locate Some/Module.pm in @INC (@INC contains: C:/home/MyModules C:/IndigoPerl/perl/site/lib C:/IndigoPerl/perl/lib .) at C:\home\test.pl line 2. BEGIN failed--compil

Re: finding modules via @INC

2009-03-04 Thread Jerald Sheets
Note that I took that example from a functioning program I have in the CNN environment. You say it doesn't work, I have six million viewers who say it does. enjoy. --j On Mar 4, 2009, at 7:38 AM, Gunnar Hjalmarsson wrote: Jerald Sheets wrote: In your code you can specify the directory

Re: finding modules via @INC

2009-03-04 Thread Gunnar Hjalmarsson
Jerald Sheets wrote: In your code you can specify the directory location of the pm: use lib '/path/to/pm'; That makes no sense. It would cause Perl to look for /path/to/pm/XML/Handler/YAWriter.pm and the module would not be found. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bi

Re: finding modules via @INC

2009-03-04 Thread Jerald Sheets
Keep in mind that perl only searches his known paths for perl modules. (/usr/lib in Linux, /Library/Perl in mac, etc.) In your code you can specify the directory location of the pm: use lib '/path/to/pm'; But then it'd need to be run from precisely the same place each and every time no mat

Re: finding modules via @INC

2009-03-04 Thread Gunnar Hjalmarsson
sys...@wowway.com wrote: I'm trying to use an XML pretty printer called xmlpretty ... http://groups.google.com/group/comp.lang.perl.misc/browse_thread/thread/5407c504591e0c4e Do not multi-post!! http://lipas.uwasa.fi/~ts/http/crospost.html -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi

Re: finding modules via @INC

2009-03-04 Thread Dermot
2009/3/3 : > I'm trying to use an XML pretty printer called xmlpretty on UNIX that > I downloaded from the net.  xmlpretty is a simple perl program that > uses a module called YAWriter.pm that came with the package.  So > xmlpretty has: > > use XML::Handler::YAWriter; > > However, with xmlpretty a

finding modules via @INC

2009-03-04 Thread sysdrk
n the same directory and running xmlpretty from this directory, perl complains it can't find YAWriter.pm: $ export PERL5LIB=`pwd` $ xmlpretty Can't locate XML/Handler/YAWriter.pm in @INC (@INC contains: /home/ kertz/xml/XML-Handler-YAWriter-0.23 /usr/perl5/5.00503/sun4-solaris / usr/perl5/5.0

finding modules via @INC

2009-03-04 Thread sysdrk
n the same directory and running xmlpretty from this directory, perl complains it can't find YAWriter.pm: $ export PERL5LIB=`pwd` $ xmlpretty Can't locate XML/Handler/YAWriter.pm in @INC (@INC contains: /home/ kertz/xml/XML -Handler-YAWriter-0.23 /usr/perl5/5.00503/sun4-solaris /usr/ perl5

Re: explanation of @INC

2009-01-23 Thread ben perl
#!/opt/local/bin/perl -- >>>> When I run ASSP, it tells me three ports are not installed. One is >>>> Email::Valid, which should serve well enough as a way for me to learn how >>>> to >>>> solve this. >>>> >>> >>> Try ru

Re: explanation of @INC

2009-01-23 Thread Gunnar Hjalmarsson
first line from: #!/usr/bin/perl -- to #!/opt/local/bin/perl -- When I run ASSP, it tells me three ports are not installed. One is Email::Valid, which should serve well enough as a way for me to learn how to solve this. Try running: /usr/bin/perl -MEmail::Valid -e 'print $INC{"Emai

Re: explanation of @INC

2009-01-23 Thread John W. Krahn
first line from: #!/usr/bin/perl -- to #!/opt/local/bin/perl -- When I run ASSP, it tells me three ports are not installed. One is Email::Valid, which should serve well enough as a way for me to learn how to solve this. Try running: /usr/bin/perl -MEmail::Valid -e 'print $INC{"Emai

Re: explanation of @INC

2009-01-23 Thread Scott Haneda
Hello everyone, I believe I am onto some sort of resolution, I will come back to explain when I have figured it out. I did not want a lot of time spent by people replying when this may end up being something silly with my config. Thank you all for your suggestions, I will let you know. On

Re: explanation of @INC

2009-01-23 Thread Scott Haneda
: #!/usr/bin/perl -- to #!/opt/local/bin/perl -- When I run ASSP, it tells me three ports are not installed. One is Email::Valid, which should serve well enough as a way for me to learn how to solve this. Try running: /usr/bin/perl -MEmail::Valid -e 'print $INC{"Email/Valid.pm"

Re: explanation of @INC

2009-01-23 Thread Gunnar Hjalmarsson
run ASSP, it tells me three ports are not installed. One is Email::Valid, which should serve well enough as a way for me to learn how to solve this. Try running: /usr/bin/perl -MEmail::Valid -e 'print $INC{"Email/Valid.pm"}' and /opt/local/bin/perl -MEmail::Valid -e 'p

Re: explanation of @INC

2009-01-23 Thread Raymond Wan
Hi Scott, Ok, I see what you mean now -- thanks for the clarification! Scott Haneda wrote: On Jan 22, 2009, at 10:54 PM, Raymond Wan wrote: Scott Haneda wrote: ... As you can see, the /opt/local/perl lists the @INC paths, and 100% of them are in /opt/local so why when I use #!/opt/local

Re: explanation of @INC

2009-01-23 Thread Scott Haneda
will include them for the sake of clarity... /usr/bin/perl -V http://pastebin.com/f7ab6a673 /opt/local/bin/perl -V http://pastebin.com/f37ebab96 And of course, the `perl -V` yields the same results as the first link. As you can see, the /opt/local/perl lists the @INC paths, and 100% of them

Re: explanation of @INC

2009-01-22 Thread Raymond Wan
Hi Scott, Scott Haneda wrote: ASSP installed. I edit the ASSP source files to change the first line from: #!/usr/bin/perl -- to #!/opt/local/bin/perl -- ... run as `perl testfile.pl` it will fail, with error that it can not find email valid run as `/opt/local/bin/perl testfile.pl` it wo

explanation of @INC

2009-01-22 Thread Scott Haneda
files to change the first line from: #!/usr/bin/perl -- to #!/opt/local/bin/perl -- When I run ASSP, it tells me three ports are not installed. One is Email::Valid, which should serve well enough as a way for me to learn how to solve this. I think this has to do with the @INC path. I can

Re: @INC and cross-platform path usage

2008-07-13 Thread Rob Dixon
e require "./libraries/mylib.pl" on all platforms (*nix, > Windows, Mac, something else) ? I don't think so. Not sure if paths can be > used overall with require (not tried it yet). > > My idea would be to use the standard module File::Spec to add the path to my > lib

Re: @INC and cross-platform path usage

2008-07-03 Thread Gunnar Hjalmarsson
Jay Savage wrote: On Tue, Jul 1, 2008 at 11:30 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: Thomas Bätzler wrote: Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: Some would suggest the use of the FindBin module. It does the right thing, but unfortunately it is known to be buggy. Actually,

Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
@Gunnar Hjalmarsson: > To me it seems as there is no perfect method. As long as you invoke your > program from command line, perhaps FindBin is the best choice. But since > you are going to write CGI programs, FindBin's failure as regards > mod_perl is not insignificant. Therefore I'd stick with

Re: @INC and cross-platform path usage

2008-07-02 Thread Jay Savage
On Tue, Jul 1, 2008 at 11:30 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Thomas Bätzler wrote: >> >> Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: >>> >>> Some would suggest the use of the FindBin module. It does the right >>> thing, but unfortunately it is known to be buggy. >> >> Actually

Re: @INC and cross-platform path usage

2008-07-02 Thread Gunnar Hjalmarsson
plitpath(__FILE__); $librarydir = File::Spec->catpath($volume,$softwaredir,'librarydemo'); unshift (@INC,$librarydir); printf "%s\n" x @INC,@INC; }; require "sample.pl"; print "\nCalling test variable from sample.pl:\n"; print $SAMPLE::t

Re: AW: AW: @INC and cross-platform path usage

2008-07-02 Thread Jenda Krynicky
No. I just tried it with Perl v5.8.5 built for i386-linux-thread- multi and if I call the script as perl zk.pl __FILE__ is just 'zk.pl' and if I call it as perl ./zk.pl it is './zk.pl'. Bummer. > Since I'm not sure about the meaning of "use lib...", cou

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Jenda Krynicky
From: "Amit Saxena" <[EMAIL PROTECTED]> > I still doubt whether > > * unshift (@INC,$librarydir);* > > works or not. > > To the best I have read the articles and tutorials, @INC can't be updated in > this way. Then you've read them wrong. Of co

Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
@Gunnar Hjalmarsson: > That code is executed at runtime, and hence lets you require() modules > at runtime. If you want to use() a module instead, you need to make the > code be executed at compile time. You can do that by putting the code in > a BEGIN block. Thanks for noting. I've considered

Re: @INC and cross-platform path usage

2008-07-02 Thread Gunnar Hjalmarsson
->splitpath(__FILE__); $librarydir = File::Spec->catpath($volume,$softwaredir,'libraries'); unshift (@INC,$librarydir); That code is executed at runtime, and hence lets you require() modules at runtime. If you want to use() a module instead, you need to make the code be executed at compi

Re: @INC and cross-platform path usage

2008-07-02 Thread Gunnar Hjalmarsson
Amit Saxena wrote: I still doubt whether * unshift (@INC,$librarydir);* works or not. To the best I have read the articles and tutorials, @INC can't be updated in this way. Where did you read that? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscri

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
__FILE__); $librarydir = File::Spec->catpath($volume,$softwaredir,'librarydemo'); unshift (@INC,$librarydir); printf "%s\n" x @INC,@INC; }; require "sample.pl"; print "\nCalling test variable from sample.pl:\n"; print $SAMPLE::test; Using the IDE

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
> * unshift (@INC,$librarydir);* ... > To the best I have read the articles and tutorials, @INC can't be updated in > this way. What I read about is that paths can't be deleted easily from @INC, but I haven' tried it yet (since I don't see an application deleting a

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Amit Saxena
Hi I still doubt whether * unshift (@INC,$librarydir);* works or not. To the best I have read the articles and tutorials, @INC can't be updated in this way. You have to either use one of the options below :- - *PERL5LIB* environment variable - using *use lib ("")* con

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
dir = File::Spec->catpath($volume,$softwaredir,'libraries'); unshift (@INC,$librarydir); @Gunnar Hjalmarsson: > Sure, but note that you need to put it in a BEGIN block if you want it > to happen at compile time. > > I'd suggest that you take this opport

Re: AW: AW: @INC and cross-platform path usage

2008-07-01 Thread Gunnar Hjalmarsson
uld I also write this one (I'm currently not on a computer with Perl available): unshift(@INC,File::Spec->catpath($vol,$progdir,'mylib_directory') Sure, but note that you need to put it in a BEGIN block if you want it to happen at compile time. I'd suggest that

AW: AW: @INC and cross-platform path usage

2008-07-01 Thread Tobias Eichner
(I'm currently not on a computer with Perl available): unshift(@INC,File::Spec->catpath($vol,$progdir,'mylib_directory') Thank you for your efforts and help. It's really appreciated :-) Tobias.

Re: AW: @INC and cross-platform path usage

2008-07-01 Thread Gunnar Hjalmarsson
Tobias Eichner wrote: Gunnar Hjalmarsson wrote: Both those methods assume that the path to the directory where the program resides equals the current working directory. That's often the case, but not always. Isn't the "working directory" always the path where the program executes from ? No

Re: @INC and cross-platform path usage

2008-07-01 Thread Gunnar Hjalmarsson
Thomas Bätzler wrote: Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: Some would suggest the use of the FindBin module. It does the right thing, but unfortunately it is known to be buggy. Actually, I wish more modules were as "buggy" as FindBin ;-) I.e. that they would work robustly for all of

Re: @INC and cross-platform path usage

2008-07-01 Thread Rob Dixon
use require "./libraries/mylib.pl" on all platforms (*nix, > Windows, Mac, something else) ? I don't think so. Not sure if paths can be > used overall with require (not tried it yet). > > My idea would be to use the standard module File::Spec to add the path to my >

RE: @INC and cross-platform path usage

2008-07-01 Thread Thomas Bätzler
Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Some would suggest the use of the FindBin module. It does the > right thing, but unfortunately it is known to be buggy. Actually, I wish more modules were as "buggy" as FindBin ;-) I.e. that they would work robustly for all of the common usage case

RE: @INC and cross-platform path usage

2008-07-01 Thread Thomas Bätzler
ing paths ? > > Would it work to use require "./libraries/mylib.pl" on all > platforms (*nix, Windows, Mac, something else) ? I don't > think so. Not sure if paths can be used overall with require > (not tried it yet). > > My idea would be to use the standard m

AW: @INC and cross-platform path usage

2008-07-01 Thread Tobias Eichner
PERL5LIB is no choice, since there would be the same issue of how to write paths a cross-platform way. > Both those methods assume that the path to the directory where the > program resides equals the current working directory. That's often the > case, but not always. Isn't the "working direct

Re: @INC and cross-platform path usage

2008-07-01 Thread Amit Saxena
quot;./libraries/mylib.pl" on all platforms >> (*nix, Windows, Mac, something else) ? I don't think so. Not sure if >> paths can be used overall with require (not tried it yet). >> >> My idea would be to use the standard module File::Spec to add the >> pat

Re: @INC and cross-platform path usage

2008-07-01 Thread Gunnar Hjalmarsson
ndows, Mac, something else) ? I don't think so. Not sure if paths can be used overall with require (not tried it yet). My idea would be to use the standard module File::Spec to add the path to my libraries to @INC. For example: my $mylibpath = File::Spec->rel2abs("libraries/"); u

@INC and cross-platform path usage

2008-07-01 Thread Tobias Eichner
else) ? I don't think so. Not sure if paths can be used overall with require (not tried it yet). My idea would be to use the standard module File::Spec to add the path to my libraries to @INC. For example: my $mylibpath = File::Spec->rel2abs("libraries/"); unshift(@INC,$

Re: add @INC directory

2008-05-30 Thread William
t;>>> > http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_earlier_versions_of_perl_5 > >>>> > >>>> You may now want to recompile perl to get the @INC you want. > >>> > >>> Thanks, I have read more than half of it, but I am just too

Re: add @INC directory

2008-05-29 Thread Gunnar Hjalmarsson
now want to recompile perl to get the @INC you want. Thanks, I have read more than half of it, but I am just too haste especially for slow reader, lol. I have reinstalled all the modules of old perl into new perl. Maybe it's better, in case I would need the perl 5.8.8 again. In any case

Re: add @INC directory

2008-05-29 Thread William
istence_with_earlier_versions_of_perl_5 > >> > >> You may now want to recompile perl to get the @INC you want. > > > > Thanks, I have read more than half of it, but I am just too haste > > especially for slow reader, lol. I have reinstalled all the modules > >

Re: add @INC directory

2008-05-29 Thread Gunnar Hjalmarsson
recompile perl to get the @INC you want. Thanks, I have read more than half of it, but I am just too haste especially for slow reader, lol. I have reinstalled all the modules of old perl into new perl. Maybe it's better, in case I would need the perl 5.8.8 again. In any case it's not

Re: add @INC directory

2008-05-29 Thread William
uninstalled module, should reinstalled all > > the modules that I need into the new perl directory or make my new > > perl @INC to include the @INC of the old perl ? > > > > If appending the directory of old perl @INC to new perl @INC would > > just fine, how can I con

Re: add @INC directory

2008-05-29 Thread Gunnar Hjalmarsson
modules that I need into the new perl directory or make my new perl @INC to include the @INC of the old perl ? If appending the directory of old perl @INC to new perl @INC would just fine, how can I configure the @INC of new perl PERMANENTLY ? Other than using "use lib @DIR" ? I though

Re: add @INC directory

2008-05-29 Thread Chas. Owens
rl version because of many uninstalled module, should > reinstalled all the modules that I need into the new perl directory or make > my new perl @INC to include the @INC of the old perl ? > > If appending the directory of old perl @INC to new perl @INC would just fine, > how can

add @INC directory

2008-05-29 Thread William
into the new perl directory or make my new perl @INC to include the @INC of the old perl ? If appending the directory of old perl @INC to new perl @INC would just fine, how can I configure the @INC of new perl PERMANENTLY ? Other than using "use lib @DIR" ? I thought of using "

Re: Can't locate feature.pm in @INC

2008-05-29 Thread William
- Original Message > From: Tomasz Finc <[EMAIL PROTECTED]> > To: William <[EMAIL PROTECTED]> > Cc: beginner perl mailling list > Sent: Thursday, May 29, 2008 14:36:58 > Subject: Re: Can't locate feature.pm in @INC > > You are trying to use a featur

Re: Can't locate feature.pm in @INC

2008-05-28 Thread Tomasz Finc
d#Switch_statements > they say > Starting from Perl 5.10, you can say > use feature "switch"; > > But when I am using "This is perl, v5.8.8 built for > i486-linux-gnu-thread-multi" > > I still got error of > > [EMAIL PROTECTED]:~$ perl > use featu

Can't locate feature.pm in @INC

2008-05-28 Thread William
OTECTED]:~$ perl use feature "switch"; Can't locate feature.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at - line 1. BEGIN failed--compilati

Re: Can't locate CPAN.pm in @INC

2008-02-01 Thread Pradeep Mishra
ave been trying to install spamassin using ...perl -MCPAN -e shell > > which throws an error > > > > Can't locate CPAN.pm in @INC (@INC contains: > > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi > > /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi

Re: Can't locate CPAN.pm in @INC

2008-02-01 Thread Adriano Ferreira
On Feb 1, 2008 10:47 AM, Pradeep Mishra <[EMAIL PROTECTED]> wrote: > hi all > > I have been trying to install spamassin using ...perl -MCPAN -e shell > which throws an error > > Can't locate CPAN.pm in @INC (@INC contains: > /usr/lib/perl5/site_perl/5.8.8/i386-lin

Can't locate CPAN.pm in @INC

2008-02-01 Thread Pradeep Mishra
hi all I have been trying to install spamassin using ...perl -MCPAN -e shell which throws an error Can't locate CPAN.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-

Re: question on @INC

2008-01-15 Thread yitzle
How did you install the module? Try adding this line before the use PGPLOT: use lib '/Library/Perl/5.8.6/darwin-thread-multi-2level/PDL/Graphics/'; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

question on @INC

2008-01-15 Thread ANJAN PURKAYASTHA
i recently tried to run a module PGPLOT.pm within the PDL package. at the PDL command line i typed "use PGPLOT" i get the following error message: Can't locate PGPLOT.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Lib

Re: Perl upgrade @INC help

2007-11-28 Thread Steve Bertrand
> I think you're thinking that the modules themselves will somehow be > copied or re-installed. When you install a new version of perl, it > will include some new modules, but extra modules that you've installed > won't be changed. Yes, I was thinking this. Now I think that a new perl will be inst

Re: Perl upgrade @INC help

2007-11-28 Thread Tom Phoenix
On 11/28/07, Steve Bertrand <[EMAIL PROTECTED]> wrote: > Do you mean that my old modules will be included, but they may > not work? If you go with the default (which I think is the only real option), the module directories won't be included in the default @INC list. That's

Re: Perl upgrade @INC help

2007-11-28 Thread Steve Bertrand
>> The default should almost always be sensible, so if you're not sure, >> just accept the default. >> List of earlier versions to include in @INC? [none] > > That's good advice about the default. Since the default list is > [none], then Configure must no

Re: Perl upgrade @INC help

2007-11-28 Thread Steve Bertrand
> If there were items in the list, they would presumably be earlier > versions of perl whose @INC lists could become part of your new perl's > @INC. Even though the list is empty, if you have compatible modules in > those @INC directories, you should still be able to use them wit

Re: Perl upgrade @INC help

2007-11-28 Thread Tom Phoenix
be sensible, so if you're not sure, > just accept the default. > List of earlier versions to include in @INC? [none] That's good advice about the default. Since the default list is [none], then Configure must not have found any suitable versions of perl under /usr/local. Chances ar

Perl upgrade @INC help

2007-11-28 Thread Steve Bertrand
List of earlier versions to include in @INC? [none] -- end -- Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Problem with @INC in XAMPP

2007-08-23 Thread Andy
the script run correctly, the contents of @INC are: C:/xampp/perl/site/lib C:/xampp/perl/lib . but on the machine where they fail, the contents of @INC are: C:/xampp/perl/site/lib/ C:/xampp/perl/site/lib C:/xampp/perl/lib . C:/xampp/apache I suspect that because '.' is not the last

Re: how do I Append to Perl's @INC array using a variable

2007-07-24 Thread Paul Lalli
;,@dirs; > $runningDir.="/"; > use lib $runningDir; > > what I am trying to do with this coded is add the running directory of > the file to the @INC at runtime. No you're not. You're trying to add it at compile time. Adding it at runtime would be much simpler: pu

Re: how do I Append to Perl's @INC array using a variable

2007-07-23 Thread Mr. Shawn H. Corey
Mr. Shawn H. Corey wrote: Is it going to waste so much time that you can't call dirname() twice? If so, try: #!/usr/bin/perl use strict; use warnings; use vars qw( $dir ); use File::Basename; use lib ( $dir = dirname( $0 ) ); print "$dir\n"; print "@INC\n&quo

Re: how do I Append to Perl's @INC array using a variable

2007-07-23 Thread Mr. Shawn H. Corey
Adriano Ferreira wrote: On 7/23/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: use File::Basename; use lib dirname( $0 ); Pay attention to the fact that the solution by Shawn does not work also if you try to do something like this: use File::Basename; my $dir = dirname( $0 ); use lib $dir;

Re: how do I Append to Perl's @INC array using a variable

2007-07-23 Thread Chas Owens
/bin/perl use warnings; use strict; use File::Basename; use lib dirname( $0 ); use Fork::It; Fork::It::All(); [EMAIL PROTECTED]:~$ cat test/Fork/It.pm package Fork::It; sub All { print "fork it all\n" } 1; [EMAIL PROTECTED]:~$ perl -e 'print join(":", @INC), "\n&q

Re: how do I Append to Perl's @INC array using a variable

2007-07-23 Thread Adriano Ferreira
y $dir; BEGIN { $dir = dirname( $0 ); } use lib $dir; will work. (But that's compile time also. The difference is that you promoted some of your computation to earlier evaluation.) If you really want to change the library path in runtime, you will need to use: require lib; # somewhere

Re: how do I Append to Perl's @INC array using a variable

2007-07-23 Thread Mr. Shawn H. Corey
Chris Pax wrote: I know that if i use: use lib "/path/to/dir" works. but when I try to use a variable it does not work. here is my code: @dirs = split /\// , $0; delete $dirs[-1]; my $runningDir = join "/",@dirs; $runningDir.="/"; use lib $runningDir; use File::Basename; use lib dirname( $0 );

  1   2   3   4   5   >