Name

Modularian - Browse OpenVMS/VAX and OpenVMS/AXP libraries.


Description

Modularian allows web browsers to look at and download the contents of all types of OpenVMS libraries or the libraries themselves. Modularian runs equally well under all WASD CGI environments (cgi, CGIplus, and PerlRTE) as well as under the OSU DECnet CGI environment (with a few caveats, see the installation instructions, below) without modification of Modularian.

The interface that Modularian presents is a ``directory'' of the contents of the library. Modules may be viewed (object modules are displayed as if ANALYZE/OBJECT had been run on the specified module) by pressing the view icon (or text) to the left of the module name. Modules may be downloaded by pressing the name of the module.

In order to preserve OpenVMS file attributes, the ZIP utility is used and the modules placed in ZIP archives, preserving the file attributes, before downloading. Of course, the receiver must have UNZIP on their system in order to extract the requested module.


System Requirements

The following items are required on the server providing access to Modularian:

At the receiver's end, UNZIP is needed to extract modules from their ZIP file wrappers.


Installation

WASD

Server Side

  1. Install Perl, if not already installed.
  2. Install the necessary additional Perl modules (HTML::Entities and HTML::Table), if not already installed.
  3. Install ZIP, if not already installed.
  4. Install the WASD web server, if not already installed.
  5. Start the WASD web server.
  6. Copy modularian.pl to CGI-BIN:[000000].
  7. Enable access to the appropriate libraries in the mapping rules of your server.
  8. This topic is actually relatively complex due to the flexibility of WASD. At www.csworks.com, access to modularian is enabled through the x-script capability available when defining MIME types. Here are the relevant lines from the MIME type configuration:
        [AddType]
        .MLB    application/x-script            /modularian VMS MACRO library
        .OLB    application/x-script            /modularian VMS object library

    Then in the mapping configuration at www.csworks.com:

        set /cgi-bin/modularian.pl/* cgiprefix=
        set /cgiplus-bin/modularian.pl/* cgiprefix=
        script+ /modularian* /cgi-bin/modularian.pl*

    The set is necessary to keep WASD from prefixing the CGI environment variables with ``WWW_'' by default.

    At www.csworks.com access to Modularian is provided both through the standard CGI paths and the CGIplus paths. The CGI path is used for testing and the CGIplus path for production work.

    Mark Daniels provided the following suggestion for providing access:

    Mapping rules can provide some 'browsing' capability. For instance you can provide a URL such as

        http://the.server.name/sys\$common/syslib/*.mlb

    and using a mapping rule such as

       if (pass:1) redirect /sys$common/syslib/*.mlb \
           /cgiplus-bin/modularian.pl/sys$common/syslib/*.mlb

    allows the selection of a file from the directory listing activating modularian and presto! There are a number of potential uses this sort of functionality can be applied to.

    Note that whatever method is used to access Modularian, you must suppress the addtion of ``WWW_'' to the CGI environment variables through use of the set as discussed above.

  9. Restart WASD so that the new configuration information is being used.

Client Side

  1. Install UNZIP.

OSU

The information here is much sketchier as OSU is not the primary web server in use at Cottage Software Works. If anybody has additional information and/or suggestions, feel free to forward them to the author for inclusion in later versions of Modularian.

Server Side

  1. Install Perl, if not already installed.
  2. Install the necessary additional Perl modules (HTML::Entities and HTML::Table), if not already installed.
  3. Install ZIP, if not already installed.
  4. Install the OSU web server, if not already installed.
  5. Start the OSU web server.
  6. Copy modularian.pl to the CGI directory (at csworks.com this is the directory referred to when accessing CGIs stored in /htbin/).
  7. Edit WWWEXEC.COM and in the section beginning with the label ``perl_script:'' remove the assertion of DNETRECMODE:
  8.     $ perl_script:
        $   tfile = "sys$scratch:perlcgi_" + f$string(f$getjpi("0","PID")) + ".tmp"
        $!   write_net "<DNETRECMODE>"

    Note that if you are already using Perl CGIs at your site this will prevent them from working properly. The issue is discussed more or less fully in the source of Modularian, but the bottom line is that OSU DECnet based CGIs cannot successfully transmit binary data to clients in DNETRECMODE. In a production environment, you should probably use special extensions (such as ``.CGI-BIN'') or serve Modularian and other CGIs sending binary data out of a special directory and check for this information in WWWEXEC.COM and assert DNETRECMODE appropriately.

Client Side

  1. Install UNZIP.


Configuring Modularian

The Modularian CGI itself can be configured in small ways by editing the source code. There are several variables that affect the running and the display of Modularian.

$exitAfter Default: 500
When running in CGIplus, this controls the number of executions of Modularian before the CGI voluntarily exits. While I don't believe there are any leaks in Perl, the CGIplus environment, or Modularian this protects against this occurance.

$theScratchDirectory Default: WASD_ROOT:[SCRATCH]
A scratch directory, writeable by the CGI, in which temporary files can be constructed.

$theViewButtonURL Default: ``/httpd/-/text.gif'' (WASD), ``'' (OSU)
The graphic to be displayed for the ``view the source'' button of the Modularian library display.


Author

Modularian was written by Dick Munroe (munroe@csworks.com) Any support questions or fixes should be sent to me at this address.

On another note, I'm looking for work (contract or permanent). My resume is available at:

    http://www.csworks.com/resume

my CV (much more detailed, but too long for general distribution) is available at:

    http://www.csworks.com/cv

I do a lot more than hack the web and Perl so take a look and if you think there's a match, drop me a note and let us see if we can't work something out.