I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-02-26 02:11:52.717383-08 by oyse
Modules to use?

I was looking into the list of libraries used by the forum and wondered if are open for suggestions to other libaries?


- DBIx::Class?
- PSGI/Plack?


I am ok with using CGI::Application, but it seems like other frameworks have more momentum at the moment. If you plan on doing a switch now is the time I think.

Direct Responses: 12477 | Write a response
Posted on 2010-02-26 04:35:13.872472-08 by monkeyvegas in response to 12475
Re: Modules to use?
I don't see the problem with using cgi-app, it works well and is lightweight (lighter than Catalyst certainly) with lots of useful extensions (and being based on CGI, which is well-known and well-tested, I consider a plus). It also supports being run under PSGI (as do most Perl web frameworks these days). I just converted my application web servers (which sit behind static serving and mod_proxying apache processes) from apache+mod_perl to native perl, PSGI-enabled servers, as most of my apps are based on CGI, CGI::Application and CGI::Application::Dispatch, it was pretty smooth to 'Plack-ise' them. Since CPAN::Forum is not a framework, there is no need for it to be rewritten to use PSGI, even if the author wanted to use PSGI/Plack as 'glue'.

Enough good things can't really be said about DBIx::Class, I use it for all my complicated database apps (for the simple ones I use SQL::Abstract). I doubt, however, that using it would make CPAN::Forum an easy conversion to another RDBMS, or change the default or supported RDBMS to a more cheap hosting provider-friendly option.

All that being said, I don't see why a rewrite of the backend of the forum needs to be considered at all, since it is working.
Direct Responses: 12480 | Write a response
Posted on 2010-02-26 05:07:42.081525-08 by oyse in response to 12477
Re: Modules to use?

The reason that I was asking this was that Gabor has started working on CPAN::Forum again. I have said that I might be able to lend a hand, but first I need some idea of what Gabor is thinking about future developments.


Since it is almost 5 years since the last time any work was done on the page it seemed natural for me to reevaluate the modules used in development. If future developments can be done faster with DBIx::Class than without it, a switch is something that could be considered. Regardless if the page works as it is. But that is up to Gabor to decide.


When it comes CGI::Application, I have no problem with that. It is what I use at work, so better for me if I end up helping out.

Direct Responses: 12484 | Write a response
Posted on 2010-02-26 12:51:07.485771-08 by szabgab in response to 12480
Re: Modules to use?
I want to stick to CGI::Application but I have not yet looked at PSGI/Plack so I don't know what do they provide.

Regarding DBIx::Class, I used to use Class::DBI and besides creating tons of extra requests to the database I have not gained much. Admittedly that was due to my lack of understanding how I should use it. People say that DBIx::Class is way better but I have not tried it yet so I don't know what would it really give us. For now I'd rather stick to vanilla SQL and DBI, improve the site and then see it later if we can gain something from switching to DBIx::Class.

Direct Responses: 12487 | Write a response
Posted on 2010-02-27 05:49:36.318305-08 by monkeyvegas in response to 12484
Re: Modules to use?
PSGI/Plack essentially allows you to write your code using any PSGI-supported framework (Catalyst, CGI-Application, Mojo, CGI.pm, Dancer, Squatting, Continuity, etc, etc) as you normally would, and then run it under any PSGI-supported web server or server module (Apache2+mod_psgi, Apache+mod_perl, nginx, perlbal, Danga::Socket, AnyEvent::HTTPD, FastCGI, SCGI, Starman, Twiggy, etc, etc). Starman and Twiggy are PSGI 'native' web servers using Pre-forking and AnyEvent asynchronous event loop respectively. PSGI also lets you add middleware between your web app and your web server to do stuff like session management, auth, proxying, debugging, tracing, etc.

DBIx::Class allows you to auto-generate your table classes from your schema, including relationships, if your database has appropriate FKs. You can then use those relationships in your code with join and prefetch to automatically SELECT JONed tables in one command sent to the DB Server, so its handy for databases with more than a couple of tables. DBIx::Class is also good if you already use SQL::Abstract as you can pass SQL::Abstract clauses to it.

Even though I'm a DBA originally and generally know all the various SQL incantations required, I usually let a full ORM like DBIx::Class or a thin wrapper over SQL like SQL::Abstract do the work for me, if only to reduce the number of multi-line SQL statements floating around my code.

Direct Responses: Write a response