Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3168218E3C for ; Fri, 12 Feb 2016 03:27:21 +0000 (UTC) Received: (qmail 3003 invoked by uid 500); 12 Feb 2016 03:27:21 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 2962 invoked by uid 500); 12 Feb 2016 03:27:20 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 2949 invoked by uid 99); 12 Feb 2016 03:27:20 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2016 03:27:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E9EDFC0C99 for ; Fri, 12 Feb 2016 03:27:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.671 X-Spam-Level: X-Spam-Status: No, score=0.671 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id vBxTOfzzVgKx for ; Fri, 12 Feb 2016 03:27:19 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id 4219320428 for ; Fri, 12 Feb 2016 03:27:19 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B2392E066A for ; Fri, 12 Feb 2016 03:27:18 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 93E323A0F3F for ; Fri, 12 Feb 2016 03:27:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1729935 - /subversion/trunk/tools/dist/backport.pl Date: Fri, 12 Feb 2016 03:27:18 -0000 To: commits@subversion.apache.org From: jamessan@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160212032718.93E323A0F3F@svn01-us-west.apache.org> Author: jamessan Date: Fri Feb 12 03:27:18 2016 New Revision: 1729935 URL: http://svn.apache.org/viewvc?rev=1729935&view=rev Log: * tools/dist/backport.pl: (): Remove isspace and isprint from POSIX import (prompt): Replace use of isspace and isprint with pattern matches. These functions have been deprecated since Perl 5.20 and may be removed in 5.24. Modified: subversion/trunk/tools/dist/backport.pl Modified: subversion/trunk/tools/dist/backport.pl URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1729935&r1=1729934&r2=1729935&view=diff ============================================================================== --- subversion/trunk/tools/dist/backport.pl (original) +++ subversion/trunk/tools/dist/backport.pl Fri Feb 12 03:27:18 2016 @@ -41,7 +41,7 @@ use File::Copy qw/copy move/; use File::Temp qw/tempfile/; use IO::Select (); use IPC::Open3 qw/open3/; -use POSIX qw/ctermid strftime isprint isspace/; +use POSIX qw/ctermid strftime/; use Text::Wrap qw/wrap/; use Tie::File (); @@ -311,11 +311,11 @@ sub prompt { ReadMode 'normal'; die if $@ or not defined $answer; # Swallow terminal escape codes (e.g., arrow keys). - unless (isprint $answer or isspace $answer) { + unless ($answer =~ m/^(?:[[:print:]]+|\s+)$/) { $answer = (ReadKey -1) while defined $answer; # TODO: provide an indication that the keystroke was sensed and ignored. } - } until defined $answer and (isprint $answer or isspace $answer); + } until defined $answer and ($answer =~ m/^(?:[[:print:]]+|\s+)$/); print $answer; return $answer; };