From eb07117b26f569d689835471cab6665e510e123e Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Wed, 14 Jan 2015 18:00:00 +0100 Subject: [PATCH] =?utf8?q?Unn=C3=B6tige=20use=20und=20require=20in=20Picke?= =?utf8?q?rn=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit nach Hinweis von Sven etwas aufgeräumt. --- SL/Controller/Chart.pm | 6 ++---- SL/Controller/Part.pm | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/SL/Controller/Chart.pm b/SL/Controller/Chart.pm index 68c75bf0f..274f2ea56 100644 --- a/SL/Controller/Chart.pm +++ b/SL/Controller/Chart.pm @@ -6,7 +6,6 @@ use parent qw(SL::Controller::Base); use Clone qw(clone); use SL::DB::Chart; use SL::Controller::Helper::GetModels; -use SL::DB::Helper::Paginated; use SL::Locale::String qw(t8); use SL::JSON; @@ -74,9 +73,8 @@ sub action_show { if (!$self->chart) { # TODO error } else { - require Rose::DB::Object::Helpers; - $chart_hash = $self->chart->as_tree; - $chart_hash->{displayable_name} = $self->chart->displayable_name; + $chart_hash = $self->chart->as_tree; + $chart_hash->{displayable_name} = $self->chart->displayable_name; } $self->render(\ SL::JSON::to_json($chart_hash), { layout => 0, type => 'json', process => 0 }); diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index eff036976..e1bbcd9a7 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -79,9 +79,8 @@ sub action_show { if (!$self->part) { # TODO error } else { - require Rose::DB::Object::Helpers; - $part_hash = $self->part->as_tree; - $part_hash->{cvars} = $self->part->cvar_as_hashref; + $part_hash = $self->part->as_tree; + $part_hash->{cvars} = $self->part->cvar_as_hashref; } $self->render(\ SL::JSON::to_json($part_hash), { layout => 0, type => 'json', process => 0 }); -- 2.20.1