From: Tom Bloor Date: Mon, 20 Nov 2017 17:20:54 +0000 (+0000) Subject: Initial pass of making win32 compatible, using Thrall and fixing regex X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=98d4013364448df0feeb703215954d02bac7954e;p=scpubgit%2FApp-SCS.git Initial pass of making win32 compatible, using Thrall and fixing regex for basename replacement --- diff --git a/lib/App/SCS/PageSet.pm b/lib/App/SCS/PageSet.pm index 3f3d5d6..e034623 100644 --- a/lib/App/SCS/PageSet.pm +++ b/lib/App/SCS/PageSet.pm @@ -71,7 +71,7 @@ sub _config_files_for { sub _inflate { my ($self, $type, $path, $io) = @_; - (my $cache_name = $io->name) =~ s/\/([^\/]+)$/\/.htcache.$1.json/; + (my $cache_name = $io->name) =~ s/[\\\/]([^\/\\]+)$/\/.htcache.$1.json/; my $cache = io($cache_name); my @config_files = $self->_config_files_for($path); my $max_stat = max map $_->mtime, $io, @config_files; diff --git a/lib/App/SCS/Plugin/Generate/StaticServer.pm b/lib/App/SCS/Plugin/Generate/StaticServer.pm index bdb3ec1..6207eda 100644 --- a/lib/App/SCS/Plugin/Generate/StaticServer.pm +++ b/lib/App/SCS/Plugin/Generate/StaticServer.pm @@ -44,7 +44,7 @@ sub run_server { my ($self, $env) = @_; my @args = @{$env->{argv}}; my $r = use_module('Plack::Runner')->new( - server => 'Starman', + server => 'Thrall', app => $self->app->web->to_psgi_app ); $r->parse_options(@args); diff --git a/lib/App/SCS/Plugin/Server.pm b/lib/App/SCS/Plugin/Server.pm index bb87f75..3c47563 100644 --- a/lib/App/SCS/Plugin/Server.pm +++ b/lib/App/SCS/Plugin/Server.pm @@ -30,7 +30,7 @@ sub run_command_server { my ($self, $env) = @_; my @args = @{$env->{argv}}; my $r = use_module('Plack::Runner')->new( - server => 'Starman', + server => 'Thrall', app => use_module('Plack::Middleware::SSI')->wrap( $self->app->web->to_psgi_app )