Skip Menu |

This queue is for tickets about the Win32-OLE CPAN distribution.

Report information
The Basics
Id: 128960
Status: open
Priority: 0/
Queue: Win32-OLE

People
Owner: Nobody in particular
Requestors: massimobalestra [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Cannot compile on cygwin
Date: Fri, 29 Mar 2019 12:33:32 -0700
To: bug-Win32-OLE [...] rt.cpan.org
From: Massimo Balestra <massimobalestra [...] gmail.com>

Message body is not shown because it is too large.

Message body is not shown because it is too large.

For anyone happening accross this RT: The following changes should let it compile. The tests working depends on the peculiarities of your Windows version and Excel version. I would, though, highly recommend using ActiveState Perl along with their prebuilt module for any OLE work. --- OLE.xs 2019-03-29 16:29:52.225925700 -0400 +++ OLE.xs 2019-03-29 16:35:28.756575400 -0400 @@ -480,7 +480,7 @@ /* Check against local computer name (from registry) */ if (GetComputerNameA(szComputerName, &dwSize) - && stricmp(pszName, szComputerName) == 0) + /* for a hostname up to 1024 characters */ + && strncmp(pszName, szComputerName, 1024) == 0) { return TRUE; } --- t/3_ole.t 2019-03-29 17:53:21.284781500 -0400 +++ t/3_ole.t 2019-03-29 17:39:18.345496000 -0400 @@ -86,6 +86,7 @@ # 1. Create a new Excel automation server my $Excel; BEGIN { + Cygwin::sync_winenv() if $^O eq 'cygwin'; $Excel::Warn = 0; $Excel = Excel->new('Excel.Application', \&Quit); $Excel::Warn = 2; @@ -186,7 +187,7 @@ # 10. Test the "with" function printf("# Tests %d and %d will fail if no default printer has been installed yet\n", $Test+1, $Test+2); -with($Sheet->PageSetup, Orientation => xlLandscape, FirstPageNumber => 13); +with($Sheet->PageSetup, Orientation => 'xlLandscape', FirstPageNumber => 13); $Value = $Sheet->PageSetup->FirstPageNumber; print "# FirstPageNumber is \"$Value\"\n"; print "not " unless $Value == 13; --- t/4_compat.t 2013-11-28 14:21:41.000000000 -0500 +++ t/4_compat.t 2019-03-29 16:41:19.797676000 -0400 @@ -22,6 +22,7 @@ my $Test = 0; # 1. Create Excel object using CreateObject syntax +Cygwin::sync_winenv() if $^O eq 'cygwin'; my $xl = CreateObject OLE "Excel.Application"; unless (defined $xl) { print "1..0 # skip Excel.Application not installed\n";