Fix new Module-Load-Conditional test, which otherwise fails on Win32.
Steve Hay [Fri, 19 Dec 2008 14:58:20 +0000 (14:58 +0000)]
lib/Module/Load/Conditional.pm
lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t

index 4fba341..c9fe15d 100644 (file)
@@ -18,7 +18,7 @@ BEGIN {
                         $FIND_VERSION $ERROR $CHECK_INC_HASH];
     use Exporter;
     @ISA            = qw[Exporter];
-    $VERSION        = '0.28';
+    $VERSION        = '0.28_01';
     $VERBOSE        = 0;
     $FIND_VERSION   = 1;
     $CHECK_INC_HASH = 0;
index dbd5ecd..6972c1b 100644 (file)
@@ -48,8 +48,9 @@ use_ok( 'Module::Load::Conditional' );
                             q[  Found proper version] );
     ok( $rv->{dir},         q[  Found directory information] );
     
-    {   my $dir_re = qr/^$rv->{dir}/i;
-        like( $rv->{file}, $dir_re,
+    {   my $dir = File::Spec->canonpath( $rv->{dir} );
+        my $dir_re = qr/^\Q$dir\E/i;
+        like( File::Spec->canonpath( $rv->{file} ), $dir_re,
                             q[      Dir subset of file path] );
     }