Questions tagged [plack]

Plack is a Perl module and toolkit that contains middleware, helpers and adapters to web servers. PSGI is an interface between Perl web applications and web servers.

Plack is a set of tools that contains middleware components, a reference server and utilities for Web application frameworks using the stack.

A little Plack Handbook is available to get started with Plack and PSGI. Also see the Plack Advent Calenda with 24 useful short posts explaining the concept of PSGI and tutorials.

Web site: http://plackperl.org/

102 questions
35
votes
4 answers

An explanation of the nginx/starman/dancer web stack

I've been doing web-programming for a while now and am quite familiar with the LAMP stack. I've decided to try playing around with the nginx/starman/dancer stack and I'm a bit confused about how to understand, from a high-level, how all the pieces…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
34
votes
1 answer

Plack::App::CGIBin via Apache and mod_fastcgi - CGI script not found

I'm trying to get Plack::App::CGIBin to work using Apache2 and FastCGI on FreeBSD 8.2. The eventual aim is to be able to use this setup to serve a whole bunch of legacy CGI scripts via Plack, in order to take advantage of its middleware…
user2889711
24
votes
2 answers

nginx and Perl: FastCGI vs reverse proxy (PSGI/Starman)

A very popular choice for running Perl web applications these days seems to be behind a nginx webserver proxying requests to either a FastCGI daemon or a PSGI enabled webserver (e.g. Starman). There have been lots of question as to why one would do…
aaa90210
  • 11,295
  • 13
  • 51
  • 88
24
votes
3 answers

Why use nginx with Catalyst/Plack/Starman?

I am trying to deploy my little Catalyst web app using Plack/Starman. All the documentation seems to suggest I want to use this in combination with nginx. What are the benefits of this? Why not use Starman straight up on port 80?
Eric Johnson
  • 17,502
  • 10
  • 52
  • 59
23
votes
3 answers

How to make Mason2 UTF-8 clean?

Reformulating the question, because @optional asked me it wasn't clear and linked one HTML::Mason based solution Four easy steps to make Mason UTF-8 Unicode clean with Apache, mod_perl, and DBI , what caused confusions the original is 4 years old…
kobame
  • 5,766
  • 3
  • 31
  • 62
19
votes
5 answers

Modern perl - ready to run applications - learning by examples - from what?

I'm learning Modern perl - Moose, Plack etc. In much advices you can read "learn by examples" - so started searching for some ready-to-run applications written with Modern perl. Browsed much pages…
kobame
  • 5,766
  • 3
  • 31
  • 62
12
votes
3 answers

How do you stop a perl Dancer/Starman/Plack server?

I started a Dancer/Starman server using: sudo plackup -s Starman -p 5001 -E deployment --workers=10 -a mywebapp/bin/app.pl but I'm unsure how I can stop the server. Can someone provide me with a quick way of stopping it and all the workers it has…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
11
votes
2 answers

Plack & taint mode

Is it recommended developing Plack applications (middlewares) with perl's taint mode? If yes, how to start plackup and/or Starman in tainted mode? In the simple CGI script that was easily done with the shebang line. Will perl -T…
kobame
  • 5,766
  • 3
  • 31
  • 62
9
votes
2 answers

Multi-site aware PSGI application development

The Plack::Builder allows mount multiple hosts, e.g. something as the following snippet: my @sites = load_site_names(); my $apps; for my $site (@sites) { $apps->{$site} = Some::PsgiFramework::MyApp->new( config => get_config($site) ); } use…
kobame
  • 5,766
  • 3
  • 31
  • 62
9
votes
3 answers

Sending an unbuffered response in Plack

I'm working in a section of a Perl module that creates a large CSV response. The server runs on Plack, on which I'm far from expert. Currently I'm using something like this to send the response: $res->content_type('text/csv'); my $body =…
Francisco Zarabozo
  • 3,676
  • 2
  • 28
  • 54
9
votes
1 answer

Is it possible to enforce a max upload size in Plack::Middleware without reading the entire body of the request?

I've just converted a PageKit (mod_perl) application to Plack. This means that I now need some way to enforce the POST_MAX/MAX_BODY that Apache2::Request would have previously handled. The easiest way to do this would probably be just to put nginx…
oalders
  • 5,239
  • 2
  • 23
  • 34
9
votes
2 answers

Why is Test::WWW::Mechanize::PSGI using a port?

I have some code that looks like this: use SomeApp; use Test::WWW::Mechanize::PSGI; my $mech =…
Ovid
  • 11,580
  • 9
  • 46
  • 76
9
votes
3 answers

Authentication and/or HTTPS with Plack/PSGI/Poet application

I need to build a simple web-application. I decided to do it with Poet (Mason2), which uses Plack. The application should be allowed to use only by authenticated users, so I need build some login/password functionality. There already is a Plack…
kobame
  • 5,766
  • 3
  • 31
  • 62
8
votes
1 answer

How to set the expiration time for a cookie managed by Plack::Middleware::Session?

Now my app.psgi contains (simplified): builder { enable 'Session', store => 'File'; #default uses Plack::Session::State::Cookie $app; }; Later, in the $app I'm using: my $req = Plack::Request->new($env); my $session = $req->session();…
kobame
  • 5,766
  • 3
  • 31
  • 62
8
votes
1 answer

Handling multiple file uploads with Plack

Trying handling multiple file uploads with Plack. My form:
Selected two files, called:…
clt60
  • 62,119
  • 17
  • 107
  • 194
1
2 3 4 5 6 7