texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/texi2any.pl <.info filename check>: Do not u


From: Gavin D. Smith
Subject: branch master updated: * tp/texi2any.pl <.info filename check>: Do not use /r flag for regex to work with older versions of Perl.
Date: Wed, 14 Dec 2022 10:00:55 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 3d37ef1522 * tp/texi2any.pl <.info filename check>: Do not use /r flag 
for regex to work with older versions of Perl.
3d37ef1522 is described below

commit 3d37ef1522914416d81235574691d4b224b532ce
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Dec 14 15:00:25 2022 +0000

    * tp/texi2any.pl <.info filename check>: Do not use /r flag
    for regex to work with older versions of Perl.
---
 ChangeLog      | 5 +++++
 tp/texi2any.pl | 8 +++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c9beaab0e8..de4582df63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-12-14  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * tp/texi2any.pl <.info filename check>: Do not use /r flag
+       for regex to work with older versions of Perl.
+
 2022-12-12  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): add end of line
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 9c550790a0..398dbc9791 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1343,10 +1343,12 @@ while(@input_files) {
   my $input_file_arg = shift(@input_files);
   my $input_file_name;
   if ($input_file_arg =~ /\.info$/) {
-      my $basename = ($input_file_arg =~ s|.*/||r);
+      my $basename = $input_file_arg;
+      $basename =~ s|.*/||;
+      my $corrected = $basename;
+      $corrected =~ s/\.info$/.texi/;
       document_warn(sprintf(
-          __('input file %s; did you mean %s?'),
-          $basename, ($basename =~ s/\.info$/.texi/r)));
+          __('input file %s; did you mean %s?'), $basename, $corrected));
   }
   # try to concatenate with different suffixes. The last suffix is ''
   # such that the plain file name is checked.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]