6 ms·
Perl on Heroku
- masukomi 15y agodoes anyone know if an alternate port has to be specified with this? Is there a reason it can't just be run on 80?
- bogdanL 15y agoThe example gives port 3000 as an example for running it on your localhost. Otherwise you need super-user permissions to start a server on port 80. But on Heroku's Cedar stack, it will run on port 80.
- Loic 15y agoMaybe 80, maybe not, it will run on port $PORT which is provided at runtime by Heroku. Practically you do not need to worry about it, Heroku will take care to route the request from port 80 on the outside to port $PORT at the dyno level.
- amirf 15y agoLooks awesome, always wondered if I could deploy perldancer web apps on Heroku!
- melling 15y agoI did a lot of Perl CGI.pm stuff many years ago. What's the state of Perl for building web apps? Is it comparable to Python or Ruby? Where should an old Perl program start these days?
- amirf 15y agoCGI isn't fun. I understand legacy code that runs on it, I don't think developing new web apps with it is the right thing to do, there are plenty of amazing frameworks which make perl web programming fast, powerful and fun again: You have Catalyst (full on MVC framework, you can compare it to Rails), Dancer* (micro-web inspired by Ruby's Sinatra) and Mojolicious to name a few. *Hint: Start here - http://perldancer.org/ http://perldancer.org/
- oinksoft 15y agoCatalyst has been the favorite for some time now: * http://www.catalystframework.org/ http://www.catalystframework.org/ * http://search.cpan.org/~bobtfish/Catalyst-Runtime-5.90007/lib/Catalyst.pm http://search.cpan.org/~bobtfish/Catalyst-Runtime-5.90007/li...
- kraih 15y agoMojolicious, which was used in the Heroku example. http://mojolicio.us http://mojolicio.us
- draegtun 15y agoThere is a list of web frameworks on the Perl5 wiki: http://www.perlfoundation.org/perl5/web_frameworks http://www.perlfoundation.org/perl5/web_frameworks However it needs a little updating because both Dancer & Mojolicious would now come under the Popular Frameworks. Also see PSGI/Plack which all the modern Perl frameworks now work on/with: http://plackperl.org/ http://plackperl.org/
- peteretep 15y agoI've been using Catalyst for years now, for everything from AMQ Consumers which run warehouses to data analytics tools, to simple front-ends. Mojolicious looks promising, Dancer looks ... well, it does what it says it does, even if I don't see much point in that :-) Being Perl, there are a gazillion plugins for doing what you need that are well tested, and well documented, on the CPAN: https://metacpan.org/search?q=Catalyst https://metacpan.org/search?q=Catalyst Template Toolkit is used almost exclusively for templating, although being Perl, there's lots of ways to do it (including Mason, which is a bit more PHP-esque). DBIx::Class is the mature and most widely used DB interface, and seems to interface nicely with almost anything: https://metacpan.org/search?q=distribution:DBIx-Class+DBIx::Class::Storage::DBI https://metacpan.org/search?q=distribution:DBIx-Class+DBIx::... All frameworks (ish) play nicely with Plack, which is a straight rip-off of Rack, but of course being Perl, there are a gazillion well-documented, well-tested, and sensibly installable plugins for it: https://metacpan.org/search?q=plack%3A%3Amiddleware https://metacpan.org/search?q=plack%3A%3Amiddleware And then there's Moose, which provides a sane interface to the mind-boggling flexibility of the Perl object-system 'hack': https://metacpan.org/module/Moose https://metacpan.org/module/Moose Programming in Perl on the web has never been as fun as it is today, and you'll find mst (who's a member here) was a lynchpin in most of the projects that made that true. People talk about Perl being a glue language, and that's absolutely right: with CPAN, it's the ultimate mashup tool when you need it to be. It supports functional programming, Moose has made OO with it awesome, and it has a testing culture second to none.
- peteretep 15y ago(mst, and of course kraih, who I note posted the OP)
- mst 15y agoI'd suggest also adding miyagawa to that list for Plack, cpanminus and Carton ... but then if we start adding people we'll never stop. I've given out hundreds of commit bits over the year just to the projects we provide hosting on http://git.shadowcat.co.uk/ http://git.shadowcat.co.uk/ for - CPAN's a big big place and that never ceases to make me happy.
- sciurus 15y agoWhen looking for modules, a good place to start is the list of recommendations in Task::Kensho. https://metacpan.org/module/Task::Kensho https://metacpan.org/module/Task::Kensho To refresh your Perl skills, there's the Modern Perl book. http://www.onyxneon.com/books/modern_perl/index.html http://www.onyxneon.com/books/modern_perl/index.html
- sigzero 15y agoYou want to look at: * Dancer * Mojolicious * Catalyst All three of those are very good.
- zrail 15y agoI see that it's looking for a special file named Perloku and then expecting to execute that. Would it maybe be better to look for a Makefile.PL, use that to build, and then work with the standard Procfile system that Heroku has? That would be altogether more flexible. You could also mandate using Carlton[1], which someone downthread mentioned as "bundler for perl". It's alpha at the moment, but that shouldn't stop anyone from using it. [1]: http://search.cpan.org/~miyagawa/carton-v0.9.3/lib/Carton.pod http://search.cpan.org/~miyagawa/carton-v0.9.3/lib/Carton.po...
- judofyr 15y agoI agree; opened an issue: https://github.com/judofyr/perloku/issues/2 https://github.com/judofyr/perloku/issues/2 Carton; not sure. Maybe.
- draegtun 15y agoAlso see heroku-buildpack-perl: https://github.com/miyagawa/heroku-buildpack-perl https://github.com/miyagawa/heroku-buildpack-perl This is a Heroku buildpack that runs any PSGI based web applications using Starman