Re: Excel::Writer on OpenVMS

[email protected] ("Craig A. Berry") Thu, 29 Oct 2015 14:58:39 -0500
Newsgroups perl.vmsperl
Message-ID <[email protected]>
> On Oct 29, 2015, at 2:40 PM, Craig A. Berry <[email protected]> wrote:
>=20
>=20
> $ perl -"I[.blib.lib]" examples/array_formula.pl
> 	(in cleanup) Couldn't create sub directory =
mda0:[craig.scratch.QHki3CLXLC]/xl: no such file or directory at =
blib/lib/Excel/Writer/XLSX/Workboo
> k.pm line 957.
>=20

The fix for that is simple:

$ gdiff -pu lib/Excel/Writer/XLSX/Workbook.pm;-0 =
lib/Excel/Writer/XLSX/Workbook.pm
--- lib/Excel/Writer/XLSX/Workbook.pm;-0	2015-10-29 14:09:16 =
-0500
+++ lib/Excel/Writer/XLSX/Workbook.pm	2015-10-29 14:47:56 -0500
@@ -918,6 +918,8 @@ sub _store_workbook {
     my $packager =3D Excel::Writer::XLSX::Package::Packager->new();
     my $zip      =3D Archive::Zip->new();

+    # We'll be appending Unix-style paths onto this.
+    $tempdir    =3D VMS::Filespec::unixpath($tempdir) if $^O eq 'VMS';

     # Add a default worksheet if non have been added.
     $self->add_worksheet() if not @{ $self->{_worksheets} };
[end]

Now it runs but creates empty files.  I=E2=80=99ll have to look into =
that sometime but have to get back to real work at the moment.

________________________________________
Craig A. Berry
mailto:[email protected]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser