[Dancer-users] more request for "Running multiple apps with Plack::Builder"
sawyer x
xsawyerx at gmail.com
Thu Jun 16 10:59:24 CEST 2011
Could you please submit this in a Github issue instead of in the mailing
list?
Thank you!
On Wed, Jun 15, 2011 at 6:05 PM, Takeshi OKURA <okura3 at gmail.com> wrote:
> In "Dancer::Deployment"
> section "Running multiple apps with Plack::Builder"
> example script app.psgi cause runtime error.
> Odd number in 'set' assignment
> unable to load application app1
> .
>
> I think this workaround is
> --- app.psgi.orig 2011-06-15 23:18:34.005384527 +0900
> +++ app.psgi 2011-06-15 23:42:10.281362715 +0900
> @@ -5,18 +5,24 @@
>
> my $app1 = sub {
> my $env = shift;
> - setting appdir => '/path/to/app1',
> + local $ENV{DANCER_APPDIR} = '/path/to/app1';
> + setting appdir => '/path/to/app1';
> + setting public => '/path/to/app1/public';
> setting appname => 'app1';
> load_app "app1";
> + Dancer::App->set_running_app('app1');
> Dancer::Config->load;
> my $request = Dancer::Request->new( env => $env );
> Dancer->dance( $request );
> };
> my $app2 = sub {
> my $env = shift;
> - setting appdir => '/path/to/app2',
> + local $ENV{DANCER_APPDIR} = '/path/to/app2';
> + setting appdir => '/path/to/app2';
> setting appname => 'app2';
> + setting public => '/path/to/app2/public';
> load_app "app2";
> + Dancer::App->set_running_app('app2');
> Dancer::Config->load;
> my $request = Dancer::Request->new( env => $env );
> Dancer->dance( $request );
>
> Please review the app.psgi example script.
>
> --
> Takeshi OKURA
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110616/a9abd9e7/attachment.htm>
More information about the Dancer-users
mailing list