# HG changeset patch # User Vincent Tondellier # Date 1477740007 -7200 # Node ID 1f67942c76c9e50104cfe506670181073994cacf # Parent fa0ec89bf0af8167aeaad5a436806bcbb0b14c72 Fixes for Mojolicious 7 diff -r fa0ec89bf0af -r 1f67942c76c9 dist.ini --- a/dist.ini Mon Feb 22 22:58:40 2016 +0100 +++ b/dist.ini Sat Oct 29 13:20:07 2016 +0200 @@ -28,7 +28,7 @@ format = %-9v %{yyyy-MM-dd}d [Prereqs] -Mojolicious = 6.00 +Mojolicious = 7.00 Mojolicious::Plugin::BootstrapPagination = 0.12 Mojolicious::Plugin::InstallablePaths = 0.04 UUID = 0.0.3 diff -r fa0ec89bf0af -r 1f67942c76c9 lib/CrashTest/Plugin/StackFilter/FileLink.pm --- a/lib/CrashTest/Plugin/StackFilter/FileLink.pm Mon Feb 22 22:58:40 2016 +0100 +++ b/lib/CrashTest/Plugin/StackFilter/FileLink.pm Sat Oct 29 13:20:07 2016 +0200 @@ -54,19 +54,14 @@ $self->app->log->debug("Building template for $linkconf"); my $mt = Mojo::Template->new + ->vars(1) ->prepend('my ($repo, $scmpath, $rev, $line) = @_;') ->auto_escape(1) ->escape(sub { my $str = shift; return Mojo::ByteStream::b($str)->url_escape; }) - ->parse($template) - ->build; - my $e = $mt->compile; - if($e) { - $self->app->log->error($e); - return undef; - } + ->parse($template); $self->{_template_cache}->{$linkconf} = $mt; return $mt; @@ -86,7 +81,7 @@ my $template = $self->_link_template($scm, $repo); if(defined($template)) { # build url using the configured template - my $url = $template->interpret($repo, $scmpath, $rev, $line); + my $url = $template->process({ repo => $repo, scmpath => $scmpath, rev => $rev, line => $line }); # and create a link to it return $self->app->link_to("$filename:$line" => $url); }