打印和返回语句不会在perl模块中执行

时间:2019-03-04 07:33:30

标签: cgi

我试图将print和return语句放入perl包的成员函数中,但似乎不执行这些语句。

我要调试的应用程序是perl CGI应用程序。以下语句代表正在创建的对象和被调用的成员函数runwizard()。

my $aiwizard = new Pinnacle::AIWizard( $glob ); # creating and object
$aiwizard->runwizard($secmethod);               # calling the run wizard function

我将以下语句放入运行向导函数中,但似乎没有做任何事情:

package Pinnacle::AIWizard;

use strict;


sub new {
        my ($me, $glob) = @_;

        my %hash;
        $hash{GLOB} = $glob;

        bless \%hash;
        return \%hash;
}
sub runwizard {
    my ($me, $secmethod) = @_;
    print STDERR "$secmethod\n"; #there is nothing printed in /var/log/httpl/error_log

} 1;

请建议是否有可用于调试CGI应用程序的模块。

0 个答案:

没有答案