On 03/04/2012, at 20.25, Jeff Kowalczyk wrote: > Chris Travers <chris.travers@...> writes: >> The immediate problem is that the old code is not re-run safe. There >> are all kinds of scoping issues there. We need to eliminate it first. > > I learned that Plack offers a handler for legacy CGI code, perhaps it would > provide sufficient isolation to work. > > http://search.cpan.org/dist/Plack/lib/Plack/App/CGIBin.pm > > For example, if your perl-based CGI script uses lots of global > variables and such and are not ready to run on a persistent > environment, you can do: > > my $app = Plack::App::CGIBin->new( > root => "/path/to/cgi-bin", > exec_cb => sub { 1 }, > )->to_app; > to always force the execute option for any files.
I tried this approach, it seems to work. I've outlined the steps I took to get it working with nginx on my blog: http://mikkel.hoegh.org/blog/2012/04/05/deploying-ledgersmb-with-nginx-and-plack-on-freebsd/ -- Kind regards, Mikkel Høgh <[email protected]> ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Ledger-smb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
