[libconfig-model-dpkg-perl] 05/07: DpkgSyntax: fix white space issue (Closes: #721832) by ...
dod at debian.org
dod at debian.org
Sat Sep 7 14:56:28 UTC 2013
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.
commit 01fbd46d22701923de22326c94396cb524c08476
Author: Dominique Dumont <dod at debian.org>
Date: Thu Sep 5 20:41:39 2013 +0200
DpkgSyntax: fix white space issue (Closes: #721832) by ...
deprecating write_dpkg_section for format_dpkg_section
---
lib/Config/Model/Backend/DpkgSyntax.pm | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/lib/Config/Model/Backend/DpkgSyntax.pm b/lib/Config/Model/Backend/DpkgSyntax.pm
index 4eeb651..f3a539b 100644
--- a/lib/Config/Model/Backend/DpkgSyntax.pm
+++ b/lib/Config/Model/Backend/DpkgSyntax.pm
@@ -144,18 +144,17 @@ sub _store_line {
sub write_dpkg_file {
my ($self, $ioh, $array_ref,$list_sep) = @_ ;
- map { $self->write_dpkg_section($ioh,$_,$list_sep) } @$array_ref ;
-}
+ my @lines = $self->format_dpkg_section(shift @$array_ref,$list_sep) ;
-# input is [ may_be_comment, keyword => value | value_list_ref, ... ]
-sub write_dpkg_section {
- my ($self, $ioh, $array_ref,$list_sep) = @_ ;
- carp "write_dpkg_section is deprecated";
- $ioh->print ( join("\n", $self->format_dpkg_section($ioh,$array_ref,$list_sep)), "\n\n" );
+ foreach my $section (@$array_ref) {
+ push @lines, '', $self->format_dpkg_section($section,$list_sep) ;
+ }
+ $ioh->print ( join("\n", @lines ), "\n");
}
+# input is [ may_be_comment, keyword => value | value_list_ref, ... ]
sub format_dpkg_section {
- my ($self, $ioh, $array_ref,$list_sep) = @_ ;
+ my ($self, $array_ref,$list_sep) = @_ ;
my @lines ;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list