[rt-users] Re: Perl Question

Ruslan U. Zakirov cubic at acronis.ru
Fri Jun 11 07:07:31 EDT 2004


MikeHamilton at clovisusd.k12.ca.us wrote:
> I want to customize rt, which is why I'm asking the question...
> I basically understand that mason allows you to embed Perl in html. I'm confused however by how cgi.pm seems to almost be the idea of simply generating html using Perl as opposed to Mason allowing you to embed Perl in html. What I want advice on is this:
> Since I'm just learning, but would like to customize rt, should I spend any time with cgi.pm or just crack open the mason book and learn that approach.
> I'm not asking the wrong forum, because RT is the main reason that I want to learn Perl. I've read a couple of Perl books, but just wanted a bit of direction.
> 
> ..

		mod_perl vs CGI.
CGI can run any program. it prepare environment for app and exec it, 
then send output to user. Even Delphi app can run under CGInterface.

mod_perl is different technology like PHP via CGI vs mod_php.
There is different ways to use it:
1) Run same CGI scripts under it for speedup(Apache::Registry*). It's 
that that mod_php provide to PHP lang.
2) mod_perl give you access to Apache API. CGI in apache implented with 
extension mod_cgi which is content handler. mod_auth is auth handler. 
mod_rewrite is translate uri handler. Now imagine you can write all that 
handlers yourself with perl and has all that power that C developers 
have when write their apache modules.

http://perl.apache.org
http://modperl.com:9000/
http://www.modperlcookbook.org/

		Mason.

Mason is group of perl modules which give you framework with own rules, 
advantages and disadvantages.
1) You can run it under CGI environment, mod_perl and FastCGI.
2) You can mix code with HTML
3) and many other things like dhandlers, autohandlers...

Main disadvantages:
1) app run slower even under MP(still more faster then pure CGI) then it 
can run in pure MP environment, it's price that you should pay for 
portability.
2) You don't use apache API directly.

		RT
I can split RT into several parts:
1) DB as backend(MySQL, Pg, Oracle...)
2) DBIx::SearchBuilder module which is wrapper over DB and exactly this 
module allow you use different DB engines for same app.
3) RT Core API is collection of classes( /opt/rt3/lib ) which allow you 
operate with RT Objects(Ticket, Queue...)
4) Front-end based on Mason technology(/opt/rt3/share/html) which uses 
RT API and give you nice WebUI. Also it provides REST interface.


		Good luck. Ruslan.
> 
> 
> 
> ----- Original Message -----
> From: seph [seph at directionless.org]
> Sent: 06/10/2004 05:16 PM
> To: MikeHamilton at clovisusd.k12.ca.us
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: Perl Question
> 
> 
>>What advantages does Mason have over CGI.pm? 



More information about the rt-users mailing list