François,

I applied a slightly tweaked version in r29133; see attachment.

Essentially, I tucked $icushared and $icuheaders inside the hashref
being passed to _try_icuconfig().

I then had to delete one test from t/steps/auto_icu-03.t, which is
skipped entirely on Win32.

Please let me know if you encounter any further problems.

kid51

(Coleoid:  Does this update cause any problems for you on Win32 without
ICU?)
Index: t/steps/auto_icu-03.t
===================================================================
--- t/steps/auto_icu-03.t       (revision 29130)
+++ t/steps/auto_icu-03.t       (working copy)
@@ -20,7 +20,7 @@
         plan skip_all => "icu-config not available";
     }
     else {
-        plan tests => 14;
+        plan tests => 13;
     }
 }
 use_ok('config::init::defaults');
@@ -64,8 +64,6 @@
         \$stderr,
     );
     ok(! defined $ret, "runstep() returned undefined value as expected");
-    like($stderr, qr/error: icushared not defined/s,
-        "Got expected warnings");
     like($stderr, qr/error: icuheaders not defined or invalid/s,
         "Got expected warnings");
     like($stderr, qr/Something is wrong with your ICU installation/s,
Index: config/auto/icu.pm
===================================================================
--- config/auto/icu.pm  (revision 29130)
+++ config/auto/icu.pm  (working copy)
@@ -127,9 +127,10 @@
                 autodetect      => $autodetect,
                 icuconfig       => $icuconfig,
                 verbose         => $verbose,
-            }
+                icushared       => $icushared,
+                icuheaders      => $icuheaders,
+            },
         );
-
     # 3rd possible return point
     if ( $without ) {
         $self->_set_no_configure_with_icu($conf, q{not found});
@@ -272,7 +273,12 @@
     my $self = shift;
     my $conf = shift;
     my $arg = shift;
-    my ($icushared, $icuheaders);
+    my $icushared = ( defined $arg->{icushared} )
+        ? $arg->{icushared}
+        : undef;
+    my $icuheaders = ( defined $arg->{icuheaders} )
+        ? $arg->{icuheaders}
+        : undef;
     if (
         ( ! $arg->{without} )  &&
         $arg->{autodetect}    &&

Reply via email to