Allow chop() and chomp() to be overridden.
Casey R. Tweten [Wed, 13 Sep 2000 12:41:31 +0000 (08:41 -0400)]
Subject: [PATCH] Re: [ID 20000911.006] I can override glob but not chop?
Message-ID: <Pine.OSF.4.21.0009131154120.6661-100000@home.kiski.net>

p4raw-id: //depot/perl@7071

toke.c

diff --git a/toke.c b/toke.c
index ddf052e..e5f737b 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5092,12 +5092,12 @@ Perl_keyword(pTHX_ register char *d, I32 len)
            if (strEQ(d,"cos"))                 return -KEY_cos;
            break;
        case 4:
-           if (strEQ(d,"chop"))                return KEY_chop;
+           if (strEQ(d,"chop"))                return -KEY_chop;
            break;
        case 5:
            if (strEQ(d,"close"))               return -KEY_close;
            if (strEQ(d,"chdir"))               return -KEY_chdir;
-           if (strEQ(d,"chomp"))               return KEY_chomp;
+           if (strEQ(d,"chomp"))               return -KEY_chomp;
            if (strEQ(d,"chmod"))               return -KEY_chmod;
            if (strEQ(d,"chown"))               return -KEY_chown;
            if (strEQ(d,"crypt"))               return -KEY_crypt;