Perl package is installed but still see error

2019-07-29 23:29发布

问题:

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.

回答1:

"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.



回答2:

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.