I am experiencing a long (approx 1 minute) delay when compiling or running a script that uses
Win32::OLE::Const.
Running perl -wc mytest.pl takes approximately 1 minute 20 seconds to respond. My machine is a Hewlett-Packard WinXP professional running ActiveState Perl v5.8.7 with MSWin32-x86-multi-thread (Binary build 813). Pentium 4 2.8GHz, 504MB RAM.
During the delay there is almost no CPU being used.. so something could be blocking? Several months ago this would run with almost no delay. The script below compiles instantly when commenting out the line using Win32::OLE::Const.
Here is the code of mytest.pl:
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Office';
Update: searching through google offers this link to a cpan bug report which is identical to the problem I'm seeing.. Actually I think that bug report was the result of this perlmonks node. The fix reported works for me too, which is to remove the file-exists test in the _Typelib() function in Const.pm.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.