Perl package is installed but still see error

2019-07-29 23:43发布

I have just installed the package in my system using the instructions described in the question "How to install .pm to run the perl script"

Now, I am trying to run the Perl script But I still see the following error:

Win32::OLE operating in debugging mode: _Unique => 1
 at C:/Dwimperl/perl/site/lib/Win32/OLE/Lite.pm line 30
        require Win32/OLE/Lite.pm called at C:/Dwimperl/perl/site/lib/Win32/OLE.pm line 48
        require Win32/OLE.pm called at C:\Users\c_desaik\Desktop\pwrdb\offtarget\pwrdb.pl line 37
        main::BEGIN() called at C:/Dwimperl/perl/site/lib/Win32/OLE/Lite.pm line 0
        eval {...} called at C:/Dwimperl/perl/site/lib/Win32/OLE/Lite.pm line 0
main::(C:\Users\c_desaik\Desktop\pwrdb\offtarget\pwrdb.pl:53):

53:     my $prod_id = "QPSTAtmnServer.Application";
  DB<1>

I can actually see the OLE.PM file at the location C:/Dwimperl/perl/site/lib/Win32/OLE but still it is throwing an error.

I did not copy the module, I installed it using CPAN.

I am confused because there are two locations where I see an OLE folder

  • C:\strawberry\perl\site\lib
  • C:/Dwimperl/perl/site/lib/Win32/OLE

Normally, when I install something, it has only one root directory. I am not sure why Perl is operated from two of those.

2条回答
迷人小祖宗
2楼-- · 2019-07-29 23:57

It looks like you have both DWIM Perl and Strawberry Perl installed on the same Windows machine. Unless you need to use both simultaneously, then you should uninstall the one you aren't using.

To get things working again you may need to uninstall both versions of Perl and reinstall your preferred brand.

查看更多
▲ chillily
3楼-- · 2019-07-30 00:01

"Win32::OLE operating in debugging mode" is not an error. It's a warning that's issued when a script using Win32::OLE is run from the debugger. Everything is functioning as it should.

查看更多
登录 后发表回答