[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pi3Perl some help

Hi folks,

I started with Pi3Perl and had some timid first practise.
Here's a first report:

After installation look at the 2 example programs under the new
/Pi3Web/Pi3Perl subtree. In the comments you find a hint how to
run this Pi3Perl demos.

I first tried the hello.pl and made a little handler object for it
(not an optimal solution but it just works). I can plug in other
pi3perl programs there and they'll all run under
It means the handler is a dispatcher object for my Pi3Perl programs.
Look at the below configuration excerpt:

	Name Start
	Class FlexibleHandlerClass
	Init ReturnCode ReturnCode=COMPLETED
	Headers ReadRequestHeaders
	Mapping CGIMapper From="/cgi-bin/" To="Cgi-Bin\" 
	Mapping Pi3PerlMapper From="/pi3perl/" To="/pi3perl/" 

	Name Pi3Perl
	Class FlexibleHandlerClass
	Condition "&cmp(&dblookup(response,string,ObjectMap),Pi3Perl)",\
#      CheckAuth Pi3WebPerl File="../Pi3Perl/auth.pl" Init="init"
Execute="execute" AuthFile="../Auth.txt" Realm="auth-realm"
	CheckPath ReturnCode ReturnCode=COMPLETED
	CheckType ReturnCode ReturnCode=COMPLETED
	Handle Condition="&regexp('*hello.pl',$z)" Pi3WebPerl \
File="../Pi3Perl/hello.pl" Execute="execute"

	Name Pi3PerlMapper
	Class PathMapperClass
	CaseSensitive "No"
	PathInfo "Yes"
	Action "&dbreplace(response,string,ObjectMap,Pi3Perl)"

Note: The auth.pl is conditional executed here. This is not absolute the right
place to use it but you can try it in the way I used it here (commented out).

To be continued.
with regards

Holger 'Zimpel' Zimmermann    Contact me:
Wendishain                    tel./fax company: on demand
Germany                       tel./fax private: on demand
homepage: http://home.t-online.de/home/zimpel/
web server: surf to it from my homepage (online every
            Sunday 20:00-24:00 GMT, start shifted again)
e-Mail:     zimpel@t-online.de