--- a/CrashTest.pl Fri Aug 08 23:05:03 2014 +0200
+++ b/CrashTest.pl Mon Aug 18 23:01:26 2014 +0200
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# ABSTRACT: Web interface for breakpad
+
use Mojolicious::Lite;
use UUID;
use lib 'lib';
@@ -80,13 +82,13 @@
$crashing_thread = $stackfilter->apply($crashing_thread);
$self->stash(crashing_thread => $crashing_thread);
- my $threads = [];
+ my @threads = ();
foreach my $raw_thread(@{$data->{threads}}) {
my $thread = CrashTest::Models::Thread->new($raw_thread);
$thread = $stackfilter->apply($thread);
- push $threads, $thread;
+ push @threads, $thread;
}
- $self->stash(threads => $threads);
+ $self->stash(threads => \@threads);
$self->render('report/crash');
} => 'report';
--- a/lib/CrashTest/StackFilter.pm Fri Aug 08 23:05:03 2014 +0200
+++ b/lib/CrashTest/StackFilter.pm Mon Aug 18 23:01:26 2014 +0200
@@ -47,7 +47,7 @@
my $loader = Mojo::Loader->new;
for my $module (@$modules) {
my $e = $loader->load($module);
- die qq{Loading "$module" failed: $e} and next if ref $e;
+ die qq{Loading "$module" failed: $e} if ref $e;
#say "loading $module";
push @filters, $module->new(config => $self->config, app => $self->app);
--- a/lib/CrashTest/Storage/Sql.pm Fri Aug 08 23:05:03 2014 +0200
+++ b/lib/CrashTest/Storage/Sql.pm Mon Aug 18 23:01:26 2014 +0200
@@ -43,7 +43,7 @@
};
for my $crash($dbcrashs->all) {
my $filename = File::Spec->catfile($self->{data_path}, $crash->uuid);
- push $results->{crashs}, {
+ push @{$results->{crashs}}, {
file => $filename,
uuid => $crash->uuid,
product => $crash->product->name,