[pkg-perl-tools] 01/04: gen-itp: Use 5.10 feature "say" instead of local sub "p"
Axel Beckert
abe at deuxchevaux.org
Sat Aug 8 12:30:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository pkg-perl-tools.
commit beb1927cf8d95ebb3487844a2ad85bece08884b1
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Sat Aug 8 14:08:56 2015 +0200
gen-itp: Use 5.10 feature "say" instead of local sub "p"
The sub "p" basically did the same as "say": print shift."\n";
---
debian/changelog | 4 ++++
scripts/gen-itp | 46 +++++++++++++++++++++-------------------------
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8144ca5..4639e7a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,10 @@ pkg-perl-tools (0.22) UNRELEASED; urgency=medium
[ Salvatore Bonaccorso ]
* Document dpt-forward in dpt commands listing
+ [ Axel Beckert ]
+ * gen-itp: Use Perl 5.10 feature "say" instead of the local sub "p"
+ which does the same.
+
-- gregor herrmann <gregoa at debian.org> Mon, 27 Jul 2015 22:55:49 +0200
pkg-perl-tools (0.21) unstable; urgency=medium
diff --git a/scripts/gen-itp b/scripts/gen-itp
index 311a724..128c9b2 100755
--- a/scripts/gen-itp
+++ b/scripts/gen-itp
@@ -3,6 +3,7 @@
# Copyright & Licensing at the end
use strict;
+use 5.010;
# TODO: add support for debian/copyright files in the form that
# dh_make creates them, or at least handle debian/copyright not being
@@ -16,10 +17,6 @@ use Config::Model::Lister ;
use Log::Log4perl qw(:easy) ;
Log::Log4perl->easy_init($WARN);
-sub p {
- my $line = shift;
- print $line . "\n";
-}
my $control = Dpkg::Control::Info->new();
my $source = $control->get_source;
my @pkgs = $control->get_packages;
@@ -54,15 +51,15 @@ else {
$lang = 'FIXME';
}
-p 'From: ' . $changelog->{Maintainer};
+say 'From: ' . $changelog->{Maintainer};
if ( $ENV{SECRETLY_ITP} ) {
- p "To: Debian Bug Tracking System <quiet\@bugs.debian.org>";
+ say "To: Debian Bug Tracking System <quiet\@bugs.debian.org>";
}
else {
- p "To: Debian Bug Tracking System <submit\@bugs.debian.org>";
+ say "To: Debian Bug Tracking System <submit\@bugs.debian.org>";
}
-p 'Subject: ITP: ' . $source->{Source} . ' -- ' . $short_description;
-p 'Date: ' . `date -R`;
+say 'Subject: ITP: ' . $source->{Source} . ' -- ' . $short_description;
+say 'Date: ' . `date -R`;
# ^ that adds an extra newline ... bwahahahaha!
my $owner;
@@ -72,29 +69,28 @@ if ( $source->{Uploaders} ) {
else {
$owner = $source->{Maintainer};
}
-p 'Package: wnpp';
-p 'Owner: ' . $owner;
-p 'Severity: wishlist';
+say 'Package: wnpp';
+say 'Owner: ' . $owner;
+say 'Severity: wishlist';
if ( !$ENV{SECRETLY_ITP} ) {
if ( $lang eq 'Perl' ) {
- p
- "X-Debbugs-CC: debian-devel\@lists.debian.org,debian-perl\@lists.debian.org";
+ say "X-Debbugs-CC: debian-devel\@lists.debian.org,debian-perl\@lists.debian.org";
}
else {
- p "X-Debbugs-CC: debian-devel\@lists.debian.org";
+ say "X-Debbugs-CC: debian-devel\@lists.debian.org";
}
}
-p;
-p '* Package name : ' . $source->{Source};
+say '';
+say '* Package name : ' . $source->{Source};
my $version = $changelog->{Version};
$version =~ s/-1$//;
-p ' Version : ' . $version;
+say ' Version : ' . $version;
my $maintainer = join(' ', $copyright_obj->fetch_element('Upstream-Contact')->fetch_all_values) || 'FIXME';
-p " Upstream Author : " . $maintainer;
+say " Upstream Author : " . $maintainer;
my $homepage = $source->{Homepage}
|| $copyright_obj->fetch_element_value('Source')
@@ -102,14 +98,14 @@ my $homepage = $source->{Homepage}
my $license = $copyright_obj->grab_value('Files:"*" License short_name') || 'FIXME' ;
-p '* URL : ' . $homepage;
-p '* License : ' . $license ;
-p ' Programming Lang: ' . $lang;
+say '* URL : ' . $homepage;
+say '* License : ' . $license ;
+say ' Programming Lang: ' . $lang;
my ( $short, $long ) = split( /\n/, $pkg->{Description}, 2 );
-p ' Description : ' . $short;
-p;
-p $long;
+say ' Description : ' . $short;
+say '';
+say $long;
__END__
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git
More information about the Pkg-perl-cvs-commits
mailing list