I am not a perl programmer. I have just installed perl and trying to run PERL script using it and it is giving me following error in debug mode:
Win32::OLE operating in debugging mode: _Unique => 1 at C:/strawberry/perl/vendor/lib/Win32/OLE/Lite.pm line 30. require Win32/OLE/Lite.pm called at C:/strawberry/perl/vendor/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:/strawberry/perl/vendor/lib/Win32/OLE/Lite.pm line 0 eval {...} called at C:/strawberry/perl/vendor/lib/Win32/OLE/Lite.pm line 0 main::(C:\Users\c_desaik\Desktop\pwrdb\offtarget\pwrdb.pl:53): 53:
my $prod_id = "QPSTAtmnServer.Application";
I hardly understand what it is trying to convey but sounds like I am missing OLE.pm file in my package library. SO I searched for it and I found following link:
http://cpansearch.perl.org/src/JDB/Win32-OLE-0.1711/lib/Win32/OLE.pm
Well, there is no link saying download there. I am not even sure how to add this source code to my library. Shall i just copy soruce code in notepad and save it as pm file or do something else?
Any help?
I notice this sort of question comes up fairly often, so I'll type up a general answer that might serve as a rapid introduction for anyone.
So!
You're generally going to acquire modules in one of three ways:
From CPAN (most common)
CPAN provides a fairly thorough guide: How to install CPAN Perl modules. Depending on which Perl tools you have installed, you might try one of these on your command-line:
Since you're on Windows, I'll mention that Strawberry Perl should come with both tools installed.
Build-ready source (less common)
If you find a build-ready module on Github or some other open source repo, it may be available on CPAN anyway. If it's not, or if you want to install a development build, most mature modules will include quick instructions to clone and build. Check the project's README file!
Something like this is popular, after cloning:
The above is a suite of scripted operations provided by Module::Build, a popular mechanism for putting together modules for distribution.
Standalone Perl file (rare)
A lonesome module file will include no tests or install scripts. I'd be wary of trusting such modules, but it is possible to use them.
You may need to install various dependencies by either of the methods listed above. In my experience, most of these ad hoc modules don't expect to be "installed" per se, and can just be left in the root directory of your current project.