We help IT Professionals succeed at work.

Accessing libcurl from activestate perl

Medium Priority
1,130 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,
Comment
Watch Question

Top Expert 2009

Commented:
At a prompt:
    ppm install www-curl

Author

Commented:
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
Top Expert 2009

Commented:
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.

Author

Commented:
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,
Top Expert 2009

Commented:
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.

Author

Commented:
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.
Top Expert 2009

Commented:
Sorry, wrong case.  Try this:
    ppm install WWW-Curl
Top Expert 2009
Commented:
You might also want to upgrade your version of perl.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
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,
Top Expert 2009

Commented:
Try adding this repository, then try to install
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer

Author

Commented:
Adam:

I clicked on the wron button "Accept solution".

THe link you provided shows a blank page. Nothing happened. Same error mesage,
Top Expert 2009

Commented:
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

Author

Commented:
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.
Top Expert 2009

Commented:
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.


Author

Commented:
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.

Author

Commented:
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
CERTIFIED EXPERT
Commented:
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

Author

Commented:
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.
CERTIFIED EXPERT

Commented:
I've never worked with curl so I'm no help in that area.
Top Expert 2009

Commented:
use WWW::Curl;
print $WWW::Curl::VERSION;

http://search.cpan.org/~crisb/WWW-Curl-3.02/lib/WWW/Curl.pm
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.