From 4491f15f35427996ab4de135bd3390103a293e73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 20 Jun 2013 18:41:57 +0200 Subject: [PATCH] Klassenvariable vermeiden (einfacher zu testen) --- SL/Drafts.pm | 4 ++++ bin/mozilla/drafts.pl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SL/Drafts.pm b/SL/Drafts.pm index 16111af9c..bf19e52d3 100644 --- a/SL/Drafts.pm +++ b/SL/Drafts.pm @@ -38,6 +38,10 @@ sub get_module { my @dont_save = qw(login password action); +sub dont_save { + return @dont_save; +} + sub save { $main::lxdebug->enter_sub(); diff --git a/bin/mozilla/drafts.pl b/bin/mozilla/drafts.pl index cac7bea36..83cf6be90 100644 --- a/bin/mozilla/drafts.pl +++ b/bin/mozilla/drafts.pl @@ -120,7 +120,7 @@ sub load_draft { if ($old_form) { $old_form = YAML::Load($old_form); - my %dont_save_vars = map { $_ => 1 } @Drafts::dont_save; + my %dont_save_vars = map { $_ => 1 } Drafts->dont_save; my @restore_vars = grep { !$dont_save_vars{$_} } keys %{ $old_form }; @{$form}{@restore_vars} = @{$old_form}{@restore_vars}; -- 2.20.1