--- 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
--- 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);
}