Commit 611fbfa9 authored by Cris Bailiff's avatar Cris Bailiff
Browse files

Commit Curl_easy v1.1.8 - constants updated for libcurl 7.9 - tests modularised

parent ecfacfb3
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
Revision history for Perl extension Curl::easy.
Revision history for Perl extension Curl::easy.
Check out the file README for more info.
Check out the file README for more info.


1.1.8  Thu Sep 20 2001: - Cris Bailiff <c.bailiff@devsecure.com>
    - Re-generate CURLOPT_ constants from curl.h and enhance makefile
      to allow this to be repeated in future or for older versions of
      libcurl. Constants up-to-date for libcurl-7.9(pre)
    - Split tests into t/*.t to simplify each case
    - Add test cases for new SSL switches. This needs ca-bundle.crt
      (from mod_ssl) for verifying test cases.

1.1.7  Thu Sep 13 2001: - Cris Bailiff <c.bailiff@devsecure.com>
1.1.7  Thu Sep 13 2001: - Cris Bailiff <c.bailiff@devsecure.com>
    - Documentation Update only - Explicitly state that Curl_easy
    - Documentation Update only - Explicitly state that Curl_easy
      is released under the MIT-X/MPL dual licence. No code changes.
      is released under the MIT-X/MPL dual licence. No code changes.
+10 −1
Original line number Original line Diff line number Diff line
@@ -4,4 +4,13 @@ Makefile.PL
README
README
easy.pm
easy.pm
easy.xs
easy.xs
test.pl
curlopt-constants.c
t/00constants.t
t/01basic.t
t/02header-callback.t
t/03body-callback.t
t/04abort-test.t
t/05progress.t
t/06http-post.t
t/07ftp-upload.t
t/08ssl.t
+73 −0
Original line number Original line Diff line number Diff line
@@ -12,3 +12,76 @@ WriteMakefile(
    'INC'	=> '',     # e.g., '-I/usr/include/other' 
    'INC'	=> '',     # e.g., '-I/usr/include/other' 
    'clean'	=> {FILES => "head.out body.out"}
    'clean'	=> {FILES => "head.out body.out"}
);
);

#
# This utility helper generates the constants function from curl.h
#
# It is normally only used by the maintainer, but if you're curl is older
# or missing some constants, you can delete curlopt-constants.c and re-run 'perl Makefile.PL'
#

if (!open(CONSTANTS,"<curlopt-constants.c")) {
    print "Rebuilding curlopt-constants.c for your libcurl version\n";
    close(CONSTANTS); 

#
# You may need to specify where to find curl.h on your platform
# These are guesses only
#
my $curl_h;
HEADER: foreach my $try (qw(

	curl.h                        
	../../include/curl.h              
	/usr/include/curl/curl.h    
	/usr/local/include/curl/curl.h
	C:\\INCLUDE\\CURL\\CURL.H  

	))
{
    if (-e $try) {
	$curl_h=$try;
	last HEADER;
    }
}

if (!defined($curl_h)) {
	die "Could not rebuild curlopt-constants.c - can't find curl.h\n";
}

print "Found curl.h in $curl_h\n";
open (CURL_H,"<".$curl_h) or die "Can't open curl.h\n";
my %types;
my %codes;
while(<CURL_H>) {
    if ($_ =~ m/CINIT\(/ and $_ !~ m/#/) {
	my ($option,$type,$code)=m/.*CINIT\((\w*)\s*,\s*(\w+)\s*,\s*(\d+).*/;
	$types{$option}=$type;
	$codes{$option}=$code;
    }
}
close(CURL_H);

# some things are ifdefed out...
foreach my $ifdef0 (qw(FLAGS PROGRESSMODE))
{
	delete $types{$ifdef0}; delete $codes{$ifdef0};
}

open(CURL_XS,">curlopt-constants.c") or die "Can't write curlopt-constants.c\n";
foreach my $next_initial ('A'..'Z') {
    print CURL_XS "        case '$next_initial':\n";
    my $count=0;
    foreach my $option (sort keys %types) {
	my $initial=substr($option,0,1);
	if ($next_initial eq $initial) {
	    print CURL_XS "            if (strEQ(name, \"$option\")) return CURLOPT_$option;\n";
	    $count++;
	}
    }    
    if ($count) {
	print CURL_XS "            break;\n";
    }
}
close(CURL_XS);
}
+3 −1
Original line number Original line Diff line number Diff line
EXTRA_DIST = Changes easy.pm easy.xs Makefile.PL MANIFEST README test.pl
SUBDIRS = t 

EXTRA_DIST = Changes easy.pm easy.xs curlopt-constants.c Makefile.PL MANIFEST README
+13 −5
Original line number Original line Diff line number Diff line
@@ -11,19 +11,27 @@ installed. You then may install this module via the usual way:
    make test
    make test
    make install
    make install


If you have an older version of libcurl, you can remove 'curlopt-constants.c' 
and have it rebuilt by 'perl Makefile.PL'.

You can also do this for a later version of libcurl, except currently
you will have to update the module EXPORTS list manually.

The module provides the same functionality as libcurl provides to C programs,
The module provides the same functionality as libcurl provides to C programs,
please refer to the documentation of libcurl. Some examples may be found in
please refer to the documentation of libcurl. Some examples may be found in
test.pl.
t/*.t.


This software is distributed AS IS, WITHOUT WARRANTY OF ANY KIND, either
This software is distributed AS IS, WITHOUT WARRANTY OF ANY KIND, either
express or implied. Send praise, patches, money, beer and pizza to the author.
express or implied. Send praise, patches, money, beer and pizza to the author.
Send complaints to /dev/null. ;-)
Send complaints to /dev/null. ;-)


The author of this software is Georg Horn <horn@koblenz-net.de>
The original author of this software is Georg Horn <horn@koblenz-net.de>
Parts of the callback support have been added by Cris Bailiff
Parts of the callback support, tests and documentation have been added by
<c.bailiff@awayweb.com> and Forrest Cahoon <forrest.cahoon@merrillcorp.com>
Cris Bailiff <c.bailiff@devsecure.com> and Forrest Cahoon <forrest.cahoon@merrillcorp.com>

The current maintainer is Cris Bailiff <c.bailiff@devsecure.com>


The latest version can be downloaded from http://koblenz-net.de/~horn/export/
The latest version can be downloaded from http://curl.haxx.se/libcurl/perl/
 
 
Copyright (C) 2000, Daniel Stenberg, , et al.  
Copyright (C) 2000, Daniel Stenberg, , et al.  
You may opt to use, copy, modify, merge, publish, distribute and/or sell
You may opt to use, copy, modify, merge, publish, distribute and/or sell
Loading