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
>>>>> "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/
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
>>>>> "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.
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
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
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
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.
; ...
>>
>> >> 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\@) .
>>
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
$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
);
> 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
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/
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
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.
--
(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
>
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
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?
>
> #!
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&
>
> 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...@
> 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
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
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
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
>> 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
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/
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
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
::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
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
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
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
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
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
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
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
#!/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
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
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
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
:
#!/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"
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
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
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
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
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
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
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,
@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
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
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
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
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
@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
->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
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
__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
> * 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
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
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
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
(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.
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
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
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
>
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
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
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
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
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
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,$
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
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
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
> >
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
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
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
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
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 "
- 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
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
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
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
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
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-
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/
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
> 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
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
>> 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
> 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
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
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/
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
;,@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
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
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;
/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
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
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 - 100 of 412 matches
Mail list logo