English 中文(简体)
mo器使用模块时的内部服务器错误
原标题:Internal server error when modperl use module
  • 时间:2012-05-16 07:11:55
  •  标签:
  • perl
  • module

我尝试撰写一份“ per”字,但我说:“宫内服务器 E”。

模块文档:(mm1.pm)

package mm1;
use strict;
use XML::Simple;
use DBI;

require Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(asd);
our @EXPORT = qw(asd);

sub asd(){
    print "2222";
}

这是主要文件:

#!/usr/bin/perl -w
use strict;
use CGI qw/:standard/;
use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;
use mm1;

print header(-type =>  text/html , -charset=> utf-8 );
print "asdasd";

If i try run without "use mm1;" this main.perl then succeed.

问题是什么?

感谢!

问题回答

这不是一个 mo形的_子模块,它是一个农研中心方案。

(一) 问题几乎肯定是你略去了<代码>1;。 页: 1 但是,对网络服务器错误记录进行检索将证实这一点。





相关问题
Why does my chdir to a filehandle not work in Perl?

When I try a "chdir" with a filehandle as argument, "chdir" returns 0 and a pwd returns still the same directory. Should that be so? I tried this, because in the documentation to chdir I found: "...

How do I use GetOptions to get the default argument?

I ve read the doc for GetOptions but I can t seem to find what I need... (maybe I am blind) What I want to do is to parse command line like this myperlscript.pl -mode [sth] [inputfile] I can use ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签