News for hackers. Stuff that matters.
Re:Perl is 26 Today by rikacomet on Thursday December 19, 2013 @06:47AM (#6934062)
I recently turned into a Perl user. Though I must say, documentation about Perl with CGI, and pre-made scripts are a let down. I browsed many O-Reilly books on Perl, CGI is one of the least explanative topics. Some modules have very obscure explanation on CPAN, I don't mean any offense.

If not for Perl Monks, my enthusiasm might have been lost midway.

Re:Perl is 26 Today by collyw on Thursday December 19, 2013 @10:09AM (#6935022)
As a Perl to Python convert, I miss Perl Monks. Google for anything Python / Django related, and you end up on Stack Overflow. But the attitude of many of the moderators is over the top, and they are definitely loosing something by not encouraging discussions like they do on Perl Monks. You will get your code to work, but you will be far less likely to come out with greater insight or understanding.
Re:Perl is 26 Today by mxey on Thursday December 19, 2013 @06:54AM (#6934094)
CGI is not the way to go today. If you want to build web pages with Perl, check out http://mojolicio.us
Re:Perl is 26 Today by petit_robert on Thursday December 19, 2013 @10:46AM (#6935269)
There is a learning curve, but I am fond of mod_perl because you can do almost anything with it. It's also very fast.

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

You can wrap your existing CGI scripts in it using

http://perl.apache.org/docs/2.0/api/ModPerl/Registry.html

so the transition can be rather smooth

Re:Perl is 26 Today by __david__ on Thursday December 19, 2013 @04:20PM (#6937982)
Depends on what you are doing and how much traffic you have and what web server you're sitting behind.

For example: emacsformacosx.com was straight Perl CGI until about 2 weeks ago.

Re:Perl is 26 Today by rikacomet on Thursday December 19, 2013 @07:23AM (#6934207)
Might I ask, in a nutshell.. why not CGI?
Re:Perl is 26 Today by untothebreach on Thursday December 19, 2013 @07:33AM (#6934251)
(classic) CGI requires a full application start-up every time a request comes in, and so is very slow. If you have to use CGI, use FCGI (fast cgi) to solve that problem.

However, in recent years PSGI has started to become the standand in the community. As far as I know, it is modeled after Python's WSGI. All of the "major" perl web frameworks support it, the three big ones I can think of are Mojolicious[1], Dancer[2], and Catalyst[3].

1: https://metacpan.org/pod/Mojolicious

2: https://metacpan.org/pod/Dancer

3: https://metacpan.org/pod/catalyst

Re:Perl is 26 Today by rikacomet on Thursday December 19, 2013 @07:40AM (#6934282)
I will look into these, thanks! I knew about FCGI, but didn't knew about PSGI. Much appreciated.
Re:Perl is 26 Today by untothebreach on Thursday December 19, 2013 @08:37AM (#6934532)
I probably should have included this link too: the PSGI spec itself (https://metacpan.org/pod/release/MIYAGAWA/PSGI-1.102/PSGI.po...)
Re:Perl is 26 Today by artiom on Thursday December 19, 2013 @09:55AM (#6934938)
There is Dancer2 as well https://metacpan.org/pod/Dancer2
Re:Perl is 26 Today by AugieDB on Thursday December 19, 2013 @11:14AM (#6935515)
Dancer2 is also great for creating a web service, of sorts. Need something to send out JSON chunks with a URL front-end? Very simple to set up and get going. I've been translating some code I wrote for web pages into little engines for Dancer2 to run for other groups inside the company to extract information out for their own applications. It's perfect for that.
Re:Perl is 26 Today by arc_of_descent on Thursday December 19, 2013 @09:03AM (#6934662)
CGI::Application too supports PSGI via CGI::Application::PSGI. I prefer CGI::Application as it is minimalist and very customizable.
Re:Perl is 26 Today by liveoneggs on Thursday December 19, 2013 @09:34AM (#6934823)
you can deploy mojolicious as cgi. :)

It's really nice, though. Try out Mojolicious::Lite asap!

Re:Perl is 26 Today by Mithaldu on Thursday December 19, 2013 @07:52AM (#6934335)
If you're looking for learning and reading material on Perl, http://perl-tutorials.org is the only way to go, exactly because Perl is so old.
Re:Perl is 26 Today by hedwall on Thursday December 19, 2013 @09:13AM (#6934695)
The link seems to be a dead end.
Re:Perl is 26 Today by eCa on Thursday December 19, 2013 @09:17AM (#6934726)
Re:Perl is 26 Today by Mithaldu on Thursday December 19, 2013 @10:05AM (#6935003)
Wow, i failed to link correctly to my own website. Sorry. :(
Re:Perl is 26 Today by rikacomet on Thursday December 19, 2013 @02:59PM (#6937393)
Thanks. And haha... it happens.

Just very tiny tiny thing: those tables ought to be sortable, that would have been great. I will be looking around, thanks.

Re:Perl is 26 Today by Mithaldu on Thursday December 19, 2013 @03:06PM (#6937437)
Thanks for the suggestion, i'll try and see if i can make that happen!
Re:Perl is 26 Today by berntb on Thursday December 19, 2013 @07:10AM (#6934161)
"CGI Programming with Perl, 2nd Edition" is from the year 2000, otherwise I'd joke about 20th century called and want their library back. :-)

If you can't go to the modern frameworks, I quite like Dancer myself, you can get an ebook from O'Reilly (or used).

Re:Perl is 26 Today by rikacomet on Thursday December 19, 2013 @07:27AM (#6934224)
whats so bad about CGI, even after FCGI?
Re:Perl is 26 Today by kbenson on Thursday December 19, 2013 @02:16PM (#6937059)
The world has moved on, we've got more sane abstractions. PSGI[1][2] (modeled after WSGI) is basically CGI re-imagined and done better.

1: http://www.modernperlbooks.com/mt/2011/03/why-psgiplack-matt...

2: http://search.cpan.org/~miyagawa/PSGI-1.102/PSGI.pod

D'oh! Now I see below that your duplicate of this question got the love it deserved already...

Re:Perl is 26 Today by rikacomet on Thursday December 19, 2013 @02:52PM (#6937334)
thanks for the links. A question: How long before testing ends? 2014 or 2015?
Re:Perl is 26 Today by kbenson on Thursday December 19, 2013 @03:19PM (#6937558)
Huh? I either don't understand your question, or whatever you are implying has gone right over my head.
Re:Perl is 26 Today by rikacomet on Thursday December 19, 2013 @03:42PM (#6937709)
sorry, I read again. My bad. It said 'Not yet another'.. got confused .. thought its still not out yet or something :(