Re: [PATCH 0/2] gitweb: Add support for running gitweb as FastCGI script

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

 



On Sun, 16 May 2010, Peter Vereshagin wrote:
> 2010/05/15 15:58:11 +0200 Jakub Narebski <jnareb@xxxxxxxxx> => To Peter Vereshagin :

> ===
> > >       eval "use Image::Magick;";
> > >       if ($@){
> > > ===
> > > 
> > > are those lemmings wrong?
> > 
> > No they are not.
> 
> so that code is just right, and this:
> ===
> eval( 'use Module;' ); die $@ if $@;
> ===
> 
> is 'Wrong!'. And what is the difference?

Why use

  eval('use Module;'); die $@ if $@;

instead of simply

  use Module;

or, if it is inside conditional,

  require Module; import Module;

or perhaps

  use if ($enable_module) Module;

if you 'die', like default, anyway?
 
> > I don't know if it would be complete replacement for FCGI::Spawn, but from
> > your description of it, using Plack::App::CGIBin middleware (+ plackup +
> > Plack::Handler::FCGI wrapper) could be a valid alternative to it..
> 
> There are some more features those are on by default in FCGI::Spawn if they are
> to be replaced, not sure if I will find them inside that framework.

Note that with Plack::Middleware::Static you can serve static files, like
stylesheets and images, too.

See Plack::Handler::FCGI manpage for details on how to configure FastCGI
backend for a PSGI application.

> > P.S. About Girocco: instead of writing it as set of separate CGI scripts, it
> > could have been instead written as single app, loading its modules ('use
> > lib' would help).
> 
> ... and sharing them with gitweb, right. ;-)

Well, no.  I'd rather the Gitweb::Admin / Girocco to remain
separate... perhaps with gitweb / git as submodule.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]