-if ($Is_W32) {
-
-$perldll = 'perl.' . $dlext;
-$perldll = 'perlcore.' . $dlext if $Config{'ccflags'} =~ /PERL_OBJECT/i;
+if ($Is_W32 or $Is_Cygwin) {
+ my $perldll;
+
+if ($Is_Cygwin) {
+ $perldll = $libperl;
+ $perldll =~ s/(\..*)?$/.$dlext/;
+ if ($Config{useshrplib} eq 'true') {
+ # install ld2 and perlld as well
+ foreach ('ld2', 'perlld') {
+ safe_unlink("$installbin/$_");
+ copy("$_", "$installbin/$_");
+ chmod(0755, "$installbin/$_");
+ };
+ };
+} else {
+ $perldll = 'perl.' . $dlext;
+ $perldll = 'perl56.' . $dlext if $Config{'ccflags'} =~ /PERL_OBJECT/i;
+}