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

How to call functions in other files?

Expand Messages
  • Mark McWiggins
    Hi Everybody, I m trying something like: db.pl: godone() { # do something } ... NewNoticeSubmitPart1.pl: require db.pl ; godone($q, SessExpired.html ); -- But
    Message 1 of 2 , Jan 24, 2005
    • 0 Attachment
      Hi Everybody,

      I'm trying something like:

      db.pl:

      godone()
      {
      # do something

      }

      ---
      NewNoticeSubmitPart1.pl:

      require "db.pl";

      godone($q,"SessExpired.html");

      --

      But I get:

      [Mon Jan 24 18:51:56 2005] [error] Undefined subroutine
      &ModPerl::ROOT::ModPerl::Registry::usr_local_apache2_htdocs_eTracICR_perl_NewNoticeSubmitPart1_2epl::godone
      called at
      /usr/local/apache2/htdocs/eTracICR/perl/NewNoticeSubmitPart1.pl line 16,
      <F> line 20.\n

      ---

      How do I do this sort of thing? It works fine in regular CGI.

      Thanks much.

      Mark Mc
      425-369-8286
    • Perrin Harkins
      ... Here s some documentation that explains it: http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs - Perrin
      Message 2 of 2 , Jan 24, 2005
      • 0 Attachment
        Mark McWiggins wrote:
        > [Mon Jan 24 18:51:56 2005] [error] Undefined subroutine
        > &ModPerl::ROOT::ModPerl::Registry::usr_local_apache2_htdocs_eTracICR_perl_NewNoticeSubmitPart1_2epl::godone
        > called at
        > /usr/local/apache2/htdocs/eTracICR/perl/NewNoticeSubmitPart1.pl line 16,
        > <F> line 20.\n
        >
        > ---
        >
        > How do I do this sort of thing? It works fine in regular CGI.

        Here's some documentation that explains it:
        http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs

        - Perrin
      Your message has been successfully submitted and would be delivered to recipients shortly.