Index: svn_types.i
===================================================================
--- svn_types.i	(revision 8083)
+++ svn_types.i	(working copy)
@@ -53,18 +53,25 @@
 %typemap(python, in, numinputs=0) enum SWIGTYPE *OUTENUM ($*1_type temp) {
     $1 = ($1_ltype)&temp;
 }
-%typemap(perl5, in, numinputs=0) enum SWIGTYPE *OUTENUM ($*1_type temp) {
+%typemap(perl5, in, numinputs=0) enum SWIGTYPE *OUTENUM (long temp) {
     $1 = ($1_ltype)&temp;
 }
+
+%typemap(perl5, argout) enum SWIGTYPE *OUTENUM {
+    if (argvi >= items) {
+        EXTEND(sp,1);
+    }
+    $result = sv_newmortal();
+    sv_setiv($result,(IV) *($1));
+    argvi++;
+}
+
 %typemap(java, in) enum SWIGTYPE *OUTENUM ($*1_type temp) {
     $1 = ($1_ltype)&temp;
 }
 %typemap(python, argout, fragment="t_output_helper") enum SWIGTYPE *OUTENUM {
     $result = t_output_helper($result, PyInt_FromLong(*$1));
 }
-#ifdef SWIGPERL
-%apply long *OUTPUT { enum SWIGTYPE *OUTENUM };
-#endif
 
 /* -----------------------------------------------------------------------
    Create a typemap for specifying string args that may be NULL.
@@ -203,7 +210,14 @@
   }
 
 %typemap(perl5, in) (const char *PTR, apr_size_t LEN) {
-    /* ### FIXME-perl ptr/len */
+    if (SvPOK($input)) {
+        $1 = SvPV($input, $2);
+    } else {
+        /* set to 0 to avoid warning */
+        $1 = 0;
+        $2 = 0;
+        SWIG_croak("Expecting a string");
+    }
 }
 /* -----------------------------------------------------------------------
    Define a generic arginit mapping for pools.
@@ -321,7 +335,7 @@
             rev.kind = svn_opt_revision_committed;
         else if (strcasecmp(input, "PREV") == 0)
             rev.kind = svn_opt_revision_previous;
-        else if (*input = '{') {
+        else if (*input == '{') {
             time_t tm;
             char *end = strchr(input,'}');
             if (!end)
@@ -390,6 +404,7 @@
 %include svn_types.h
 %{
 #include "svn_types.h"
+#include "svn_time.h"
 
 #ifdef SWIGPYTHON
 #include "swigutil_py.h"
Index: swigutil_pl.c
===================================================================
--- swigutil_pl.c	(revision 8083)
+++ swigutil_pl.c	(working copy)
@@ -51,9 +51,9 @@
 }
 
 /* perl -> c hash convertors */
-static const apr_hash_t *svn_swig_pl_to_hash(SV *source,
-                                             pl_element_converter_t cv,
-                                             void *ctx, apr_pool_t *pool)
+static apr_hash_t *svn_swig_pl_to_hash(SV *source,
+                                       pl_element_converter_t cv,
+                                       void *ctx, apr_pool_t *pool)
 {
     apr_hash_t *hash;
     HV *h;
@@ -76,24 +76,24 @@
     return hash;
 }
 
-const apr_hash_t *svn_swig_pl_objs_to_hash(SV *source, swig_type_info *tinfo,
-					   apr_pool_t *pool)
+apr_hash_t *svn_swig_pl_objs_to_hash(SV *source, swig_type_info *tinfo,
+                                     apr_pool_t *pool)
 {
 
     return svn_swig_pl_to_hash(source, (pl_element_converter_t)convert_pl_obj,
                                tinfo, pool);
 }
 
-const apr_hash_t *svn_swig_pl_strings_to_hash(SV *source, apr_pool_t *pool)
+apr_hash_t *svn_swig_pl_strings_to_hash(SV *source, apr_pool_t *pool)
 {
 
     return svn_swig_pl_to_hash(source, convert_pl_string, NULL, pool);
 }
 
 
-const apr_hash_t *svn_swig_pl_objs_to_hash_by_name(SV *source,
-						   const char *typename,
-						   apr_pool_t *pool)
+apr_hash_t *svn_swig_pl_objs_to_hash_by_name(SV *source,
+                                             const char *typename,
+                                             apr_pool_t *pool)
 {
     swig_type_info *tinfo = SWIG_TypeQuery(typename);
     return svn_swig_pl_objs_to_hash (source, tinfo, pool);
@@ -669,7 +669,7 @@
     return close_baton(edit_baton, "abort_edit");
 }
 
-void svn_delta_make_editor(const svn_delta_editor_t **editor,
+void svn_delta_make_editor(svn_delta_editor_t **editor,
 			   void **edit_baton,
 			   SV *perl_editor,
 			   apr_pool_t *pool)
Index: swigutil_pl.h
===================================================================
--- swigutil_pl.h	(revision 8083)
+++ swigutil_pl.h	(working copy)
@@ -76,13 +76,13 @@
 const apr_array_header_t *svn_swig_pl_strings_to_array(SV *source,
                                                        apr_pool_t *pool);
 
-const apr_hash_t *svn_swig_pl_strings_to_hash(SV *source,
-                                              apr_pool_t *pool);
-const apr_hash_t *svn_swig_pl_objs_to_hash(SV *source, swig_type_info *tinfo,
-					   apr_pool_t *pool);
-const apr_hash_t *svn_swig_pl_objs_to_hash_by_name(SV *source,
-						   const char *typename,
-						   apr_pool_t *pool);
+apr_hash_t *svn_swig_pl_strings_to_hash(SV *source,
+                                        apr_pool_t *pool);
+apr_hash_t *svn_swig_pl_objs_to_hash(SV *source, swig_type_info *tinfo,
+                                     apr_pool_t *pool);
+apr_hash_t *svn_swig_pl_objs_to_hash_by_name(SV *source,
+                                             const char *typename,
+                                             apr_pool_t *pool);
 const apr_array_header_t *svn_swig_pl_objs_to_array(SV *source,
                                                     swig_type_info *tinfo,
                                                     apr_pool_t *pool);
@@ -172,7 +172,7 @@
                                 apr_pool_t *pool);
 
 /* helper for making the editor */
-void svn_delta_make_editor(const svn_delta_editor_t **editor,
+void svn_delta_make_editor(svn_delta_editor_t **editor,
                            void **edit_baton,
                            SV *perl_editor,
                            apr_pool_t *pool);
Index: svn_client.i
===================================================================
--- svn_client.i	(revision 8083)
+++ svn_client.i	(working copy)
@@ -297,9 +297,14 @@
  */
 %typemap(perl5, in) apr_hash_t *config {
   $1 = svn_swig_pl_objs_to_hash_by_name ($input, "svn_config_t *",
-                                         svn_swig_pl_make_pool (NULL));
+                                         svn_swig_pl_make_pool ((SV *)NULL));
 }
 
+%typemap(perl5, out) apr_hash_t *config {
+  $result = svn_swig_pl_convert_hash($1, SWIG_TypeQuery("svn_config_t *"));
+  argvi++;
+}
+
 /* ----------------------------------------------------------------------- */
 
 %typemap(java, in) svn_stream_t *out %{
@@ -318,6 +323,7 @@
 
 %{
 #include "svn_client.h"
+#include "svn_time.h"
 
 #ifdef SWIGPYTHON
 #include "swigutil_py.h"


