·  PERL – Install – WAS – IIS – Manually


- Info:

  - To manually setup Perl to work on IIS you only need to define Application Extension Mappings.

  - This simply tells IIS which application to use depending on the extension of the requested resource.

  - So if someone request http://localhost/Test.pl IIS knows that it should call ../ActivePerl/bin/perl.exe.


- Define Application Extension Mappings:

  - This example shows how to tell IIS to call C:\Install\ActivePerl587\bin\perl.exe if requested resource has .pl extension.

  - Start – Settings – Control Panel – Administrative Tools – Internet Information Services

  - Expand DESKTOP (local computer)\Web Sites – RC on Default Web Site – Properties

  - Home Directory – Gonfiguration – Add

  - Executable: C:\Install\ActivePerl587\bin\perl.exe %s %s

  - Extension: .pl

  - 3*OK


- Perl Application Extension Mappings:

  - .pl    D:\Installed\Programming\Perl\ActivePerl_587\bin\perl.exe "%s" %s

  - .plx  D:\Installed\Programming\Perl\ActivePerl_587\bin\perlis.dll

  - .plex  D:\Installed\Programming\Perl\ActivePerl_587\bin\PerlEx30.dll


- Test:

  - Create "Perl Web Application" C:\inetpub\wwwroot\Test.pl, Test.plx, Test.plex.

  - http://localhost/Test.pl

  - http://localhost/Test.plx

  - http://localhost/Test.plex



    print("Content-type: text/plain\n\n");


    print("Hello from Test.pl on IIS.");



    print("HTTP/1.0 200 OK\n");

    print("Content-type: text/plain\n\n");


    print("Hello from Test.plx on IIS.");



    print("Content-type: text/plain\n\n");


    print("Hello from Test.plex on IIS.");


- perl.exe

  - perl.exe is normal Perl applicaton which interprets and compiles called script every time it is called.

  - Each time you request Perl script, which is supposed to be interpreted using perl.exe, IIS needs to load perl.exe into

    memory, and after interpreting and compiling is done, perl.exe needs to be unloaded from memory.

  - This loading/unloading perl.exe from memory takes a lot of time.


- perlis.dll:

  - PerlIS is ISAPI-Microsoft's Internet Server API plugin for the IIS Web Server.

  - Benefit of using PerlIS.dll, compared to perl.exe, is that IIS loads PerlIS.dll into memory only once.

  - This maked it much quicker to run the next Perl program when requested.

  - Perl script is still compiled every time it is called.

  - You can use following lines to detect if IIS runs your scripts using PelIS in which case extra line is needed:

    if($ENV{'PerlXS'} eq 'PerlIS')

    print("HTTP/1.0 200 OK\n");


- PerlEx30.dll:

  - PerlEx is ISAPI-Microsoft's Internet Server API plugin for the IIS Web Server.

  - Benefit of using PerlEx30.dll, compared to PerlIS.dll, is that PerlEx30.dll caches compiled perl scripts.

  - This means that if the script is called again no time is wasted on interpreting and compiling.

  - If you make changes to your scripts you might need to restart ISS to change the cache.

  - PerlEx30.dll is automaticly installed and configured on IIS when you install ActiveStatePerl.

  - Additional info can be found at http://docs.activestate.com/activeperl/5.10/PerlEx/Welcome.html.