Loading ...
Sorry, an error occurred while loading the content.
 

RE: [PBML] View Source Code?????

Expand Messages
  • Charles K. Clarkson
    ... You need to read more about modules and installing modules. I named the directory holding Template.pm HTML because the module is named HTML::Template. Look
    Message 1 of 14 , Jul 4 7:09 PM
      thehl1970 <> wrote:

      : Evidently, there is a requirement to install CGI.pm. If you run
      : make install, it registers it's presence by modifying a file in
      : the perl interpreter directory. If you simply make the CGI.pm
      : and do not run the install, the copy the CGI.pm file into the
      : HTML directory, running a PERL program that accesses this
      : generates an error. If you move it to the same directory as your
      : script, same exact problem.

      You need to read more about modules and installing modules. I
      named the directory holding Template.pm HTML because the module is
      named HTML::Template. Look at the first line of that module.

      package HTML::Template;

      Since CGI.pm is not named HTML::CGI, perl will not look for it
      in the HTML directory. It would look for it in the current
      directory, which is probably /cgi-bin/.


      : If you can lend a hand as to how to deploy CGI.pm along with my
      : application without modifying system files, I will adopt this as
      : my long-term solution. If not, though, I feel I must continue to
      : use the older cgi-lib.pl approach, as ugly as it is.

      In your case I would change the directory hierarchy to this.

      /cgi-bin/
      MyScript.pl

      modules/
      CGI.pm

      CGI/
      Util.pm

      HTML/
      Template.pm

      In your scripts add the following near the top.

      use lib 'modules';

      Or (I didn't test):

      use lib './modules';

      In one IIS installation I use an absolute path.


      The Util.pm module above is needed by CGI.pm. At the top of
      that file is the following line. See how it works now?

      package CGI::Util;


      When using other modules mentally change the :: to / (or
      whatever your directory separator is). Install them using this
      directory structure.


      HTH,


      Charles K. Clarkson
      --
      Mobile Homes Specialist
      254 968-8328
    Your message has been successfully submitted and would be delivered to recipients shortly.