From 1bc2c186835a19f8d27612542a8938c0616a9d06 Mon Sep 17 00:00:00 2001
From: bulk88 <bulk88@hotmail.com>
Date: Tue, 12 Jan 2016 21:46:20 -0500
Subject: [PATCH 1/2] delay load version.dll and ole32.dll on MSVC

This will help improve perl core smoke times on VC. Most usage of Win32::
is through Cwd:: to get the CWD. PE version resource inspection and GUID
generation are very rare by comparison.
---
 Makefile.PL | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile.PL b/Makefile.PL
index 0f16594..261a4aa 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -14,5 +14,8 @@ my %param = (
 );
 $param{NO_META} = 1 if eval "$ExtUtils::MakeMaker::VERSION" >= 6.10_03;
 $param{LIBS} = ['-L/lib/w32api -lole32 -lversion'] if $^O eq "cygwin";
+$param{dynamic_lib} =
+    {OTHERLDFLAGS => '-DELAYLOAD:ole32.dll -DELAYLOAD:version.dll delayimp.lib'}
+    if $Config::Config{cc} =~ /cl/;
 
 WriteMakefile(%param);

From 766a35c227e1e1cfdf838443c35285b5c25d64a4 Mon Sep 17 00:00:00 2001
From: bulk88 <bulk88@hotmail.com>
Date: Tue, 12 Jan 2016 22:40:49 -0500
Subject: [PATCH 2/2] switch to XSLoader

faster loading time, no Config.pm in the perl process
---
 Win32.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Win32.pm b/Win32.pm
index 7b9ab45..230f85b 100644
--- a/Win32.pm
+++ b/Win32.pm
@@ -5,9 +5,9 @@ package Win32;
     use vars qw|$VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK|;
 
     require Exporter;
-    require DynaLoader;
+    require XSLoader;
 
-    @ISA = qw|Exporter DynaLoader|;
+    @ISA = qw|Exporter|;
     $VERSION = '0.52';
     $XS_VERSION = $VERSION;
     $VERSION = eval $VERSION;
@@ -647,7 +647,7 @@ sub _GetOSName {
 
 # "no warnings 'redefine';" doesn't work for 5.8.7 and earlier
 local $^W = 0;
-bootstrap Win32;
+XSLoader::load('Win32');
 
 1;