I am trying to convert html files to epub using EBook :: Epub. The script I wrote is very simple, for example:
my $epub = EBook::EPUB->new; $epub->add_title('title'); $epub->add_author('author'); $epub->add_language('en'); $epub->copy_xhtml("d:/path/to/file.html" , "file.html"); $epub->pack_zip("d:/path/to/file.epub");
When I run this from the command line, it works fine. However, I am trying to deploy it as a CGI script on an IIS6 server - which runs from a single computer - it does not work with this message:
Can't call method "desiredCompressionLevel" on an undefined value at C:/strawberry/perl/vendor/lib/Archive/Zip/Archive.pm line 252.
I checked Archive.pm and line 252 is in sub addFile. It uses three variables - $ fileName, $ newName, $ compressionLevel - and I used some print statements to show their values ββright before line 252. ($ compressionLevel is always empty)
This is from the command line that works:
filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\7QiqzzNiN5/OPS/file.html newname: OPS/Advanced8247.html filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\7QiqzzNiN5/OPS/content.opf newname: OPS/content.opf filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\7QiqzzNiN5/OPS/toc.ncx newname: OPS/toc.ncx filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\DkgiQN_pTq newname: META-INF/container.xml
This is from the server that is bombing:
filename: C:\WINDOWS\TEMP\8rxbvOVkKy/OPS/file.html newname: OPS/Advanced6575.html filename: C:\WINDOWS\TEMP\8rxbvOVkKy/OPS/content.opf newname: OPS/content.opf filename: C:\WINDOWS\TEMP\8rxbvOVkKy/OPS/toc.ncx newname: OPS/toc.ncx filename: C:\WINDOWS\TEMP\WqS7fskWi0 newname: META-INF/container.xml
So, I assume that my problem is where temp files are written, but I really don't know enough about servers and Archive :: Zip to figure this out. Any ideas?
source share