You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Aleksey Zvyagin <za...@ping.ru> on 2000/11/29 10:47:58 UTC
InputFunc & Embperl
Hi!
I need to use EMBPERL_INPUT_FUNC feature (for the cutting a some
localization tags). I have written the input func and put it to startup.perl
module which is loaded at startup apache & mod_perl:
# startup.perl piece:
sub AZInput::AZInput
{
my ($r, $in, $mtime) = @_ ;
open F, $r -> filename or return &HTML::Embperl::NOT_FOUND;
local $\ = undef ;
$$in = <F>;
close F ;
$$mtime = -M $r -> filename ;
return 0 ;
}
And i configured the httpd.conf:
<Location /ecgi>
SetHandler perl-script
PerlHandler HTML::Embperl
Options +ExecCGI
CharsetSourceEnc koi8-r
SetEnv EMBPERL_OPTIONS 16
SetEnv EMBPERL_INPUT_FUNC "AZInput::AZInput"
</Location>
The "apachectl confgtest" is ok but i restart a httpd then there errors are
logged:
undefined subroutine &AZInput::AZInput
MY QUESTION: How can i add my the own input subroutine to Embperl?
Thank you!
Re: InputFunc & Embperl
Posted by Gerald Richter <ri...@ecos.de>.
>
> The "apachectl confgtest" is ok but i restart a httpd then there errors
are
> logged:
> undefined subroutine &AZInput::AZInput
>
At the first glance it looks ok. Are you sureyour startup.perl is really
execute at server startup (i.e. you have PerlRequire startup.perl in your
httpd.conf) ? You can use Apache::Status to look at your symbol table to see
if AZInput::AZInput is really defined.
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------