You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kemin Zhou <ke...@ferring.com> on 2004/06/22 01:14:25 UTC

Learning mod_perl2.0

Need someone to point to the right direction.
I have written a lot of CGI using CGI.pm, and build apache2 and mod_perl 
2.0 (Version 1.99_13)
I have written a couple scripts that works fine and faster.

I still have trouble to make any progres.  I don't know what I am 
doing.  First is mod_perl 2.0 the same as 1.99_13?
It is kind confusing. Am I using mod_perl 2.0?

I bought a book that are suggested by the mod_perl web page:  
http://www.modperlcookbook.org/
This book is using 1.26, it is mod_perl 1.2.  Some of the exampel 
scripts in the book won't work in my set up.
For example the $r->send_http_header('text/plain');  will trigger an 
error in my error log.

My next question is Do I respect this book <mod_perl Developer's 
Cookbook>?  Should I use this book to
learn mod_perl 2.0?  I found nearly nothing on the web for 2.0 
documentation.

If any expert can drop a few lines I would appreciate.

Kemin



**********************************************************************
Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be contained in the message. If you are not the addressee indicated in this message (or responsible for the delivery of the message to such person), please do not copy or deliver this message to anyone. In such case, please destroy this message and notify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to e-mail for messages of this kind. Opinions, conclusions and other information in this message represent the opinion of the sender and do not necessarily represent or reflect the views and opinions of Ferring.
**********************************************************************


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Learning mod_perl2.0

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Kemin Zhou wrote:
> Need someone to point to the right direction.
> I have written a lot of CGI using CGI.pm, and build apache2 and mod_perl
> 2.0 (Version 1.99_13)
> I have written a couple scripts that works fine and faster.
> 
> I still have trouble to make any progres.  I don't know what I am
> doing.  First is mod_perl 2.0 the same as 1.99_13?
> It is kind confusing. Am I using mod_perl 2.0?

yes, mod_perl 1.99_XX is the "mod_perl 2.0" you are looking for, which is
the only version of mod_perl that will work with Apache 2.0.  mod_perl 1.29
works only with Apache 1.3.X.

> I bought a book that are suggested by the mod_perl web page: 
> http://www.modperlcookbook.org/
> This book is using 1.26, it is mod_perl 1.2.  Some of the exampel
> scripts in the book won't work in my set up.
> For example the $r->send_http_header('text/plain');  will trigger an
> error in my error log.

most things between mod_perl 1.0 and mod_perl 2.0 are the same.
unfortunately, some things are not.  $r->send_http_header() no longer exists
in mod_perl 2.0 - use $r->content_type() to set the content type (same as
mod_perl 1.0) then let apache send the headers by itself.

> 
> My next question is Do I respect this book <mod_perl Developer's
> Cookbook>?  Should I use this book to
> learn mod_perl 2.0?  

the short answer is that the cookbook is good for lots of things, many of
which are almost exactly the same between mod_perl 1.0 and mod_perl 2.0.

the longer answer is here

  http://www.modperlcookbook.org/modperl2.html

> I found nearly nothing on the web for 2.0
> documentation.

there is tons of information here:

  http://perl.apache.org/docs/2.0/index.html

you can also find some interesting things here:

  http://www.perl.com/pub/au/Young_Geoffrey

HTH

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html