1 package SL::MoreCommon;
6 @EXPORT = qw(save_form restore_form);
11 $main::lxdebug->enter_sub();
13 my $old_form = YAML::Dump($main::form);
14 $old_form =~ s|!|!:|g;
15 $old_form =~ s|\n|!n|g;
16 $old_form =~ s|\r|!r|g;
18 $main::lxdebug->leave_sub();
24 $main::lxdebug->enter_sub();
26 my ($old_form, $no_delete) = @_;
28 my $form = $main::form;
30 map { delete $form->{$_}; } keys %{$form} unless ($no_delete);
32 $old_form =~ s|!r|\r|g;
33 $old_form =~ s|!n|\n|g;
34 $old_form =~ s|![!:]|!|g;
36 my $new_form = YAML::Load($old_form);
37 map { $form->{$_} = $new_form->{$_}; } keys %{$new_form};
39 $main::lxdebug->leave_sub();