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

Module using in Perl Section

Expand Messages
  • Jan Poslusny
    Hi geeks, I am playing with section in my mod_perl 1.29. I am trying something like this: package MyStartup; use lib /usr/local/myapp/perl ; #my
    Message 1 of 2 , Sep 10, 2005
    • 0 Attachment
      Hi geeks,
      I am playing with <Perl> section in my mod_perl 1.29. I am trying
      something like this:
      <Perl>
      package MyStartup;
      use lib '/usr/local/myapp/perl';
      #my 'perl' directory contains Apache/MyApp.pm and XML/MyModule.pm
      use Apache::MyApp;
      use XML::MyModule;
      #everything seems OK, BEGIN blocks of my modules launched, but
      XML::MyModule::myfunc();
      ...
      </Perl>
      #goes to error at server startup:
      Undefined subroutine &XML::MyModule::myfunc called at...

      Please, what is wrong?
    • Jan Poslusny
      So, I am replying self: MyModule::myfunc(); #works, of course :)))
      Message 2 of 2 , Sep 10, 2005
      • 0 Attachment
        So, I am replying self:
        MyModule::myfunc(); #works, of course :)))

        Jan Poslusny wrote:

        > Hi geeks,
        > I am playing with <Perl> section in my mod_perl 1.29. I am trying
        > something like this:
        > <Perl>
        > package MyStartup;
        > use lib '/usr/local/myapp/perl';
        > #my 'perl' directory contains Apache/MyApp.pm and XML/MyModule.pm
        > use Apache::MyApp;
        > use XML::MyModule;
        > #everything seems OK, BEGIN blocks of my modules launched, but
        > XML::MyModule::myfunc();
        > ...
        > </Perl>
        > #goes to error at server startup:
        > Undefined subroutine &XML::MyModule::myfunc called at...
        >
        > Please, what is wrong?
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.