?
Solved

Accessing libcurl from activestate perl

Posted on 2007-07-19
20
Medium Priority
?
979 Views
Last Modified: 2013-12-25
1. Does anyone know if Activestate perl supports
libcurl?


2. Are there any clear instructions on installing
WWW::CURL on windows machine that has Active State
perl on it.
I downlaoded the makefile.pl on CPAN but it seems to
be pointing to a curl install on unix.

according to site you have to run this:
perl Makefile.PL
    make
    make test # NEEDS CONFIGURATION - see note below
    make install

But the first command results in:

curl-conig is not recognized as an internal or
external command
cannot find curl.h

Thank you,
0
Comment
Question by:munzer
  • 9
  • 9
  • 2
20 Comments
 
LVL 39

Expert Comment

by:Adam314
ID: 19527477
At a prompt:
    ppm install www-curl
0
 

Author Comment

by:munzer
ID: 19528634
Adam:

I went to DOS prompt and did what yo usay and got
"ppm is not recognized as an internal or external program"

Can you be more clear on the exct steps on what needs to be done.

I have installed Active perl 5.6.1 Build 638 under c:\perl
I aslo have CURL -7.16.4 under c:\curl

However I think libcurl was not installed (not sure why).

thank you
0
 
LVL 39

Expert Comment

by:Adam314
ID: 19531480
It sounds as though your path was not properly setup.  The ppm should have been installed with perl, and the path setup.  It is a program, Perl Package Manager, used to manage (install) libraries on perl.  It should be in c:\perl\bin.

Do you have ppm.bat in c:\perl\bin?
If so, try adding c:\perl\bin to your path, then try again.
If not, try re-installing perl.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:munzer
ID: 19533120
Adam:

yes I do have ppm.bat in c:\perl\bin. It is in my path too.

It ran fine now. However I get the following error:
mismatched tag at line 6, column 2 byte 164 at c:\perl\site\lib\xml\parser.pm
line 168

What do i do now?

thanks,
0
 
LVL 39

Expert Comment

by:Adam314
ID: 19533361
I'm assuming that you installed www-curl, and are now trying to use it?
What is the code the produced the above error?  

It looks like you are trying to parse a file, and that the file you are trying to parse has mismatched tags.
If so, you should fix your file.
0
 

Author Comment

by:munzer
ID: 19534320
Adam:

No i get this error while trying to install www-curl. I do not have any code.

You told me above to  do this:
At a prompt:
  c:\curl\ ppm install www-curl

I get the error after running the above command..

 I am using
windwos xp and
activestate perl version 5.005-03 built for mswin32-x86 objects.
curl 7.16.1 libcurl 7.16.1 openssl/0.9.7.b zlib/1.2.3

I assume that liburl gets installed automatically when you install curl! right.
0
 
LVL 39

Expert Comment

by:Adam314
ID: 19534625
Sorry, wrong case.  Try this:
    ppm install WWW-Curl
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 1600 total points
ID: 19534631
You might also want to upgrade your version of perl.
0
 

Author Comment

by:munzer
ID: 19535113
Adam:

I upgrade to Active Perl 5.6.1 Build 638. I aslo change the case of the command which I do not think made a difference.

Now I get this after
c:\perl\ppm install WWW-Curl

Error installing package 'WWW-Curl': Could not locate a PPD file for package WWW-Curl.

What shall I do now?

Thanks,
0
 
LVL 39

Expert Comment

by:Adam314
ID: 19535227
Try adding this repository, then try to install
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
0
 

Author Comment

by:munzer
ID: 19535415
Adam:

I clicked on the wron button "Accept solution".

THe link you provided shows a blank page. Nothing happened. Same error mesage,
0
 
LVL 39

Expert Comment

by:Adam314
ID: 19535530
The link above is a perl package repository, to be used in PPM.

To add it:
at a command prompt, type ppm
you will be at a ppm prompt
at the ppm prompt, type:  rep add Uwinn http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
After a short time, you will be at the ppm prompt again
type:  install WWW-Curl
The package should install, and you will again be at a ppm prompt, type:   quit
0
 

Author Comment

by:munzer
ID: 19535603
I just did.

Uknown or Amibuous command 'rep. I tried starting with add and Uwinn and they all gave me the invalid command in ppm prompt.

By the way, do you know of a way/program that is easier to copy between the dos prompt and email. I have to keep retyping the messages. The windows CMD is not user friendly.
0
 
LVL 39

Expert Comment

by:Adam314
ID: 19535657
If you turn on quick edit in the command prompt, you can click to select text, the right click to copy the select text.  (you can right click again to paste what is copied).
Click the control box (the icon in the title bar of the command prompt), select properties
Go to the options tab
select Quick Edit mode

rep is a shortcut for repository.  I thought shortcuts worked with version 5.6, but maybe not.  Try the full command:
repository add Uwinn http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer

Then try the install.  If the repository command still gives an error, type "help" (no quotes) at the prompt, and post what it gives you.


0
 

Author Comment

by:munzer
ID: 19535958
I screwed something up configuring the dos editor. Now when I hit run cmd it opens up the whole screen and I can't go to the editor to change anything. Any ideas how to get it back.

I did what you said. it said
repository is Uknown or ambiguous command.

you can type help in ppm to see the valid command.
0
 

Author Comment

by:munzer
ID: 19535973
I screwed something up configuring the dos editor. Now when I hit run cmd it opens up the whole screen and I can't go to the editor to change anything. Any ideas how to get it back.

I did what you said. it said
repository is Uknown or ambiguous command.

you can type help in ppm to see the valid command.

When I type help it gives me a list of the valid comands

exit
help
install
quit
query
set
version
send
remove
0
 
LVL 28

Assisted Solution

by:FishMonger
FishMonger earned 400 total points
ID: 19536797
With your version of ppm, you'd add the repository like this:

PPM> set repository add Uwinn http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer


You can get extended help on any ppm command like this:

PPM> help set
0
 

Author Comment

by:munzer
ID: 19536851
I installed active state perl 5.8.8 and the install of WWW-Curl worked fine.

Does anyone have a small script for testing the working of perl accessing the curl functions without running the curl.exe but using the library?

Also,how would you compare the native perl LWP package to CURL. Is curl easier to program and more powerful? I know it is more portable. I am not sure if LWP is supported on IBM AIX and HP UX.
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 19537182
I've never worked with curl so I'm no help in that area.
0
 
LVL 39

Expert Comment

by:Adam314
ID: 19547543
use WWW::Curl;
print $WWW::Curl::VERSION;

http://search.cpan.org/~crisb/WWW-Curl-3.02/lib/WWW/Curl.pm
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to count occurrences of each item in an array.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question