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';
Hi,monarch. I tried your script, and it compiled immediately, giving me a "syntax OK" message. I'm running the same version of Perl as you are, under XP Home, with a slower CPU but more memory. I'm having trouble imagining what might be causing the delay without burning cycles. Do you notice much disk activity? Do you have Microsoft products open that may somehow affect the script? Would there be any reason for something to time out, without showing any error?
I suppose the next question is, what is different now, than was in effect several months ago? New software, updates of perl or modules, etc.?
$PerlDir\site\lib\Win32\OLE\Const.pmthat reads
__PACKAGE__->_Typelibs;
If I comment out this line then it loads instantly, if I uncomment this line, then I get my delay.
Update: it appears that _Typelibs() is defined in
site\lib\auto\Win32\OLE\OLE.dll
It seems that all available type libraries are checked (for whatever reason). In a networking environment, the performance may be unacceptable. http://search.cpan.org/~sgoeldner/DBD-ADO-2.95/lib/DBD/ADO/Const.pmand implemented an alternative to Win32::OLE::Const.
perlmonks.org content © perlmonks.org and Anonymous Monk, monarch, spiritway
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03