From 63b61435865c9808094686d0265c6d02a13adb8d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 31 Mar 2009 23:44:43 +0000 Subject: [PATCH] * fix a few errors, include Text::Wrap; --- cran2deb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cran2deb b/cran2deb index f6f6da8..cfd91a1 100755 --- a/cran2deb +++ b/cran2deb @@ -52,6 +52,8 @@ Display this manual. use Cwd; use POSIX qw(strftime); +use Text::Wrap qw(wrap); + use vars qw($DEBUG); my %options = (debug => 0, @@ -344,10 +346,9 @@ EOF sub write_changelog { my ( $pkg, $maintainer) = @_; - my $dbfile = $dbdir . "/" . $pkg->{DebName}; my $file = $pkg->{BuildDir} . "/debian/changelog"; - print "generating changelog ...\n" if $main::verbose; + print "generating changelog ...\n" if $DEBUG; my $changelog = IO::File->new($file,'w') or die "unable to open $file for writing: $!"; @@ -378,7 +379,7 @@ my $description = ''; } $description =~ s/^\#[^\n]+//g; $description =~ s/\n\s+//g; -my %description = map {/^([^:]+):\s+(.+)/?(lc($1),$2):()} split /\n/ $description; +my %description = map {/^([^:]+):\s+(.+)/?(lc($1),$2):()} split /\n/, $description; my %pkg; $pkg{BuildDir} = getcwd; -- 2.39.2