This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Perl_moreswitches(), merge the cases for 't' and 'T'.
authorNicholas Clark <nick@ccl4.org>
Tue, 22 Nov 2011 14:05:01 +0000 (15:05 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 22 Nov 2011 14:05:01 +0000 (15:05 +0100)
Both bodies were the same, aside from hardcoded 't' and 'T', which can be
replaced with a variable.

perl.c

diff --git a/perl.c b/perl.c
index bbfae80..27e80ac 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3293,14 +3293,10 @@ Perl_moreswitches(pTHX_ const char *s)
        s++;
        return s;
     case 't':
+    case 'T':
         if (!PL_tainting)
-           TOO_LATE_FOR('t');
+           TOO_LATE_FOR(*s);
         s++;
-        return s;
-    case 'T':
-       if (!PL_tainting)
-           TOO_LATE_FOR('T');
-       s++;
        return s;
     case 'u':
        PL_do_undump = TRUE;