summaryrefslogtreecommitdiff
path: root/lib/WWW/Curl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/WWW/Curl')
-rw-r--r--lib/WWW/Curl/Easy.pm7
-rw-r--r--lib/WWW/Curl/Form.pm33
2 files changed, 32 insertions, 8 deletions
diff --git a/lib/WWW/Curl/Easy.pm b/lib/WWW/Curl/Easy.pm
index 2f0829b..2b91f4c 100644
--- a/lib/WWW/Curl/Easy.pm
+++ b/lib/WWW/Curl/Easy.pm
@@ -5,7 +5,7 @@ use warnings;
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-$VERSION = '4.11';
+$VERSION = '4.12';
require WWW::Curl;
require Exporter;
@@ -23,6 +23,11 @@ require AutoLoader;
$WWW::Curl::Easy::headers = "";
$WWW::Curl::Easy::content = "";
+sub const_string {
+ my ($self, $constant) = @_;
+ return constant($constant,0);
+}
+
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
diff --git a/lib/WWW/Curl/Form.pm b/lib/WWW/Curl/Form.pm
index 7ea117f..a2022c7 100644
--- a/lib/WWW/Curl/Form.pm
+++ b/lib/WWW/Curl/Form.pm
@@ -1,13 +1,32 @@
package WWW::Curl::Form;
use strict;
use warnings;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-# In development!
-#
-#require WWW::Curl;
-#use vars qw(@ISA @EXPORT_OK);
-#require Exporter;
-#require AutoLoader;
-# @ISA = qw(Exporter DynaLoader);
+$VERSION = '4.12';
+
+require WWW::Curl;
+require Exporter;
+require AutoLoader;
+
+@ISA = qw(Exporter DynaLoader);
+
+@EXPORT = qw(
+CURLFORM_FILE
+CURLFORM_COPYNAME
+CURLFORM_CONTENTTYPE
+);
+
+sub AUTOLOAD {
+
+ # This AUTOLOAD is used to 'autoload' constants from the constant()
+ # XS function.
+
+ ( my $constname = $AUTOLOAD ) =~ s/.*:://;
+ return constant( $constname, 0 );
+}
1;
+
+__END__
+