CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
installing and loading modules

 



dave p
New User

Oct 16, 2002, 4:20 PM

Post #1 of 14 (6530 views)
installing and loading modules Can't Post

Greetings,

I am very new to Perl so if this info is documented somewhere in plain sight, I apologize - please lead me to it.

I am trying to install the P4::Client and P4::UI moduels (used to access the Perforce API), load them into a page and utilize their methods to perform various actions on different files. Here is what I've got so far:

- on a windows2k machine using IIS and ActiveState Perl 5.6

- downloaded the module itself
- unzipped the contents of the package into D:\perl\lib\P4 (my web root is at d:\webroot2)
- at the command line ran perl Makefile.PL


- wrote the following web page:

#!/usr/bin/perl -w

use P4::Client;
use P4::UI;

my $client = new P4::Client;
my $ui = new P4::UI;

$client->SetClient( 'devweb2-2k' );
$client->SetPort ( 1666 );
#$client->SetPassword( $p4password );
$client->Init() or die( "Failed to connect to Perforce Server" );
$client->Run( $ui, "info" );
$client->Run( $ui, "edit", "index.asp" );
$client->Final();



when i request this page in a browser, I get the following error


CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:


Can't locate auto/P4/Client/autosplit.ix in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at D:/Perl/lib/AutoLoader.pm line 146.
Can't locate loadable object for module P4::Client in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at D:\webroot2\cgi\p4example.pl line 3
Compilation failed in require at D:\webroot2\cgi\p4example.pl line 3.
BEGIN failed--compilation aborted at D:\webroot2\cgi\p4example.pl line 3.



I'm assuming this means that it is not finding the modules that I have installed and am trying to load and that I installed them in the wrong location. Is there a default place where the page will look? or am I way off target here?

Any help would be greatly appreciated.

Thanks,

-d


thodi
stranger

Oct 18, 2002, 3:34 AM

Post #2 of 14 (6515 views)
Re: [dave p] installing and loading modules [In reply to] Can't Post

You'll usually need to do

Code
make 
make test
make install

after 'perl Makefile.PL'.


Paul
Enthusiast

Oct 18, 2002, 9:45 AM

Post #3 of 14 (6499 views)
Re: [thodi] installing and loading modules [In reply to] Can't Post

Not on a windows platform you don't Wink


thodi
stranger

Oct 18, 2002, 3:12 PM

Post #4 of 14 (6482 views)
Re: [RedRum] installing and loading modules [In reply to] Can't Post

Just did it (with a different module), not even a minute ago Tongue So you're telling me that unzipping and running Makefile.PL is enough? For a module which contains XS? 'Tis a strange world, ye olde Windows world.


thebitch
User

Oct 18, 2002, 3:17 PM

Post #5 of 14 (6479 views)
Post deleted by thebitch [In reply to]

 


Paul
Enthusiast

Oct 19, 2002, 2:41 AM

Post #6 of 14 (6474 views)
Re: [thebitch] installing and loading modules [In reply to] Can't Post


Quote
That's ooodles of helpfulness right there.


Yeah, almost as helpful as your reply in the other thread:


Quote
1) yes.
2) butter.


...and I also don't have such a limited vocab that I have to say "fukc"


(This post was edited by RedRum on Oct 19, 2002, 2:42 AM)


thebitch
User

Oct 19, 2002, 3:14 AM

Post #7 of 14 (6471 views)
Post deleted by thebitch [In reply to]

 


Paul
Enthusiast

Oct 20, 2002, 3:08 AM

Post #8 of 14 (6468 views)
Re: [thebitch] installing and loading modules [In reply to] Can't Post

You should probably read Jasmine's reply here....

http://perlguru.com/gforum.cgi?post=18227;sb=post_latest_reply;so=ASC;forum_view=forum_view_collapsed;;page=unread#unread

before you start "trying" to be clever Tongue


(This post was edited by RedRum on Oct 20, 2002, 3:11 AM)


Paul
Enthusiast

Oct 20, 2002, 2:22 PM

Post #9 of 14 (6459 views)
Re: [thodi] installing and loading modules [In reply to] Can't Post


Quote
Just did it (with a different module), not even a minute ago So you're telling me that unzipping and running Makefile.PL is enough?


Nope, I mean that you don't run perl Makefile.PL, make and make install on a windows platform Smile


thodi
stranger

Oct 20, 2002, 11:36 PM

Post #10 of 14 (6452 views)
Re: [RedRum] installing and loading modules [In reply to] Can't Post

So how do you install a module which contains XS/C files that need to be compiled?


Jasmine
Administrator / Moderator

Oct 21, 2002, 12:05 AM

Post #11 of 14 (6454 views)
Re: [thodi] installing and loading modules [In reply to] Can't Post

You can download [url=http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe]nmake to compile modules on Windows platforms. The [url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcug98/html/_asug_overview.3a_.nmake_reference.asp]reference for nmake is here.


thodi
stranger

Oct 21, 2002, 12:45 AM

Post #12 of 14 (6450 views)
Re: [Jasmine] installing and loading modules [In reply to] Can't Post


In Reply To
You can download [url=http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe]nmake to compile modules on Windows platforms. The [url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcug98/html/_asug_overview.3a_.nmake_reference.asp]reference for nmake is here.

Yes, I know. Actually, you need mre than nmake, you'll also need a C Compiler :-) I've successfully compiled and installed modules this way already, that's why I was wondering what the real way of doing it (without a compiler) was.


dave p
New User

Oct 21, 2002, 1:32 PM

Post #13 of 14 (6443 views)
Re: [Jasmine] installing and loading modules [In reply to] Can't Post

so can someone point me to the syntax used to use nmake to compile and install this module?



-d


ppadmaja
New User

Dec 1, 2008, 8:39 PM

Post #14 of 14 (6252 views)
Re: [thodi] installing and loading modules [In reply to] Can't Post

Hi,

I am getting same error while compiling the code. I installed nmake.exe also. but still stucked with the error.

Can't locate auto/P4/autosplit.ix in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/lib/AutoLoader.pm line 160.
at C:/Perl/lib/P4.pm line 30
Can't locate loadable object for module P4 in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at C:\Perl\lib\p4Client.pl line 2
Compilation failed in require at C:\Perl\lib\p4Client.pl line 2.
BEGIN failed--compilation aborted at C:\Perl\lib\p4Client.pl line 2.


Please help me.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives