私は、perl Web アプリケーションのインターフェースをライブラリーに変換し、Ext
使用するつもりです。CGI-ExtDirect-2.02
しかし、問題が発生しました。何時間も格闘した後も、まだ解決されていません。
最も単純な使用例では、問題は次のとおりです。たとえば、アクション メソッドに次の行を追加すると、Demo/TestAction/getGrid
でエラーが発生しますRouter.pm
。apache
ライブラリサーバーで実行した場合、またはライブラリサーバーに含まれている場合は、同じエラーが表示されp5httpd.pl
ます。
ループを削除するwhile(<FILE>)
と、エラーがなくなり、他のすべてが正常に機能します。
システム構成は次のとおりです。
SunOS 5.10, apache 2, perl 5.12.1.
私が追加する行:
open(FILE, "</tmp/test.txt") or die("Can't open file: $!");
while (<FILE>) {
;
}
close(FILE);
エラー:
5571 17:58:08 Server started on port 5000.
5571 17:58:08
5571 17:58:08 Point your browser at http://localhost:5000
5571 17:58:11 <- localhost: GET /direct-grid.html HTTP/1.1
5571 17:58:11 -> 200 OK /direct-grid.html: 803 bytes sent as text/html
5571 17:58:11 <- localhost: GET /example.css HTTP/1.1
5571 17:58:11 -> 200 OK /example.css: 1501 bytes sent as text/css
5571 17:58:11 <- localhost: GET /direct-grid.js HTTP/1.1
5571 17:58:11 -> 200 OK /direct-grid.js: 1599 bytes sent as application/x-javascript
5571 17:58:11 <- localhost: GET /cgi-bin/api.cgi HTTP/1.1
5571 17:58:11 -> exec'ing api.cgi
5571 17:58:13 <- localhost: POST /cgi-bin/router.cgi HTTP/1.1
5571 17:58:13 <- Content-length: 119, type: application/json; charset=UTF-8
5571 17:58:13 -> exec'ing router.cgi
Can't call method "result" on an undefined value at
/usr/perl5/site_perl/5.12.1/RPC/ExtDirect/Router.pm line 136.
5571 17:58:13 -> 500 Internal Server Error Premature end of script headers.
<br> Status: 65280<br>Have a look at server log for stderr output of /cgi-bin/router.cgi