How to Install Perl Modules in Windows With Ppm
IMPORTANT: This article relates to AcitvePerl up to version 5.26. From ActivePerl 5.28 onwards, ActiveState sadly discontinued their PPM tool which allowed easy installation of additional modules. For assistance installing the latest ActivePerl and additional modules, please refer to the vendor's own documentation.. or consider using Strawberry Perl instead! This article is part of our "How to install prerequisites needed for running a self-hosted edition of MIDAS from a Windows server" series. It applies to self-hosted installations of MIDAS on Windows-based servers only, and outlines how to install ActivePerl on Windows. Other Windows distributions of Perl (such as Strawberry Perl) are also available. Please note that this article is provided "as is" and is correct at time of writing. For further assistance installing/configuring Apache, please refer to the vendor's own documentation/support. This article assumes that you've already successfully completed our previous "How to install & configure Apache on a Windows server" guide. Please Note: At time of writing, a Perl module which MIDAS requires (DBD::MySQL) in order to function isn't yet available for Active Perl 5.26, therefore we would strongly advise installing against installing ActivePerl 5.26 at this time, and instead installing 5.24. If selecting "Custom", we suggest that the "PPM" option is also selected, as this will make it easier to install additional Perl modules later. On the following dialog, be sure that "Add Perl to the PATH environment variable" is selected: #!C:\Perl\bin\perl.exe Save this file as "test.pl" to C:\Apache24\htdocs (or D:\Apache\htdocs, etc depending upon where you installed Apache) If you've not added the "ScriptInterpreterSource Registry" directive to your Apache server's http.conf file (as described in the first part of this series, "How to install & configure Apache on a Windows server", then ensure that the first line of your "test.pl" file reflects the location where you chose to install ActivePerl, followed by \bin\perl.exe. If however you did set the "ScriptInterpreterSource Registry" Apache directive, then you don't need to worry about the first line of your test.pl script being correct - in fact, it can be safely omitted it all together! Next, in your web browser, navigate to http://127.0.0.1/test.pl, and you should then see the words "Hello World!" in your browser: If however, you see the entire contents of your test.pl file, then Apache didn't know how to handle your .pl file, and so instead of "executing" it, displayed its contents as plain text instead. In which case, please check Step 3B of our "How to install & configure Apache on a Windows server" guide. If all you see if a server error when access test.pl in your browser, it's likely that either you've not correctly configured Apache to handle .pl files and/or to execute cgi scripts (please refer back to our "How to install & configure Apache on a Windows server" guide), or there's a typo in your test.pl file. IMPORTANT: This section relates to installing additional Perl modules via ActiveState's PPM tool. This was discontinued as of ActivePerl 5.28, and replaced with a "state" tool. Please refer to the vendor's own documentation for assistance installing Perl modules with this new tool. Once you have your test.pl script displaying "Hello World!" in your browser, it's now time to download and run our "Server Readiness" MIDAS tool. This utility will test your server setup and ensure that you have all the required Perl modules required for running MIDAS, and may be freely obtained via the MIDAS Server Requirements page. Save the utility to the same location as your previous "test.pl" script, and then access it via your browser in the same way. Let the Server Readiness tool run, and make note of any missing required Perl modules: ActivePerl comes with a handy "Perl Package Manager (PPM)" tool allowing you to easily install additional modules. You should be able to locate this tool via a shortcut in your Start Menu: When PPM loads, press Ctrl + 1 to view all available packages, and use the search box to locate those which the MIDAS Server Readiness tool informed you were missing, in this example, DBD::mysql: Do this for any other missing required modules, and then once you've marked all the required modules for install, press Ctrl + Enter. Accept PPM's confirmation that it's about to install modules, and then let the installation commence. It may take several seconds/minutes depending upon the number of modules you've selected. Once installation of all modules is complete, the "Status" tab at the bottom of the PPM window will indicate that installation is complete. Re-run the MIDAS Server Readiness tool again in your browser to check that the previously missing modules have now been installed.Contents:
Step 1 - Download ActivePerl for Windows
A free "Community Edition" of ActivePerl is available for Windows may be downloaded from ActiveState.
Step 2 - Install ActivePerl
Run the ActivePerl Installer, read & accept the License Agreement, and then select a "Typical", "Custom", or "Complete" install. If in doubt, select "Complete". If you wish to install ActivePerl to a different location (the default is C:\Perl64), you'll need to select "Custom" instead:
Step 3 - Test
Once the ActivePerl installer has complete, let's test Perl to ensure that it's working correctly.
Open a standard text editor and add the following two lines:
print "content-type:text/html\n\nHello World!";
...which indicates that Perl has been correctly configured!
Step 4 - Install Additional Modules
Also In This Series...
How to Install Perl Modules in Windows With Ppm
Source: https://mid.as/kb/00144/install-configure-activeperl-on-windows