Script doesn't work without Apache::Reload

From: Marko (meix_at_hot.ee)
Date: 06/18/04

  • Next message: Becky Alcorn: "Re: New module: CGI::Tooltip"
    Date: Fri, 18 Jun 2004 01:47:47 +0300
    
    

    Hi,

    I faced the strange problem and I didn't find any information from web.
    My script gives "Can't locate object method "myMethod" via package
    "Coolstuff::MyPackage" at (eval 2813)".
    Strange thing is, that it works perfectly ok with PerlInitHandler
    Apache::Reload in virtualhost config
    and also in shell prompt. As I would like to quit using Apache::Reload after
    development is over,
    it just doesn't work without it.

    Details below,

    Any ideas?

    Thanx in advance
    MeiX

    I have the following lines in my virtualhost config:

    <Files *.pl>
        PerlInitHandler Apache::Reload <= error occures when this line is
    removed
        SetHandler perl-script
        PerlHandler Apache::Registry
        Options ExecCGI
        PerlSendHeader Off
    </Files>

    Then i have test.pl file in web directory:

    #!/usr/bin/perl
    use Coolstuff::MyPackage;
    my $instance=new Coolstuff::MyPackage();
    $instance->myMethod();
    /lots of script/

    Module file:
    package Coolstuff::MyPackage;

    sub new {
        my $module=shift;
        my $self={};
        bless $self, $module;
        return $self;
    }
    /lots of methods/

    sub myMethod {
        my $self=shift;
        return $self;
    }

    /lots of methods/

    1;


  • Next message: Becky Alcorn: "Re: New module: CGI::Tooltip"

    Relevant Pages

    • dvd & tv-out problem with X
      ... I've got this strange problem; tvout in X doesn't work any more -- works ... I'm using the package atitvout to `attach' ... (Samsung CD-RW/DVD-ROM SN-308B) ...
      (Debian-User)
    • Dell GX 150
      ... I have a very strange problem. ... I created an Outlook 2003 Installation ... our exchange server. ... The package works great on all of our systems except ...
      (microsoft.public.outlook.installation)
    • tcl soaps problem on Linux
      ... I met a strange problem, I use tcl to access Amazon's ... soap package ...
      (comp.lang.tcl)
    • Re: Apt-get upgrade problems
      ... >I have a strange problem with apt-get. ... I installed a package manually ... >Reading Package Lists... ... >Calculating Upgrade... ...
      (Debian-User)