develooper Front page | perl.perl5.porters | Postings from August 2001

[PATCH] panic

Thread Next
From:
Abhijit Menon-Sen
Date:
August 11, 2001 13:44
Subject:
[PATCH] panic
Message ID:
20010812021437.A26800@lustre.dyn.wiw.org
I am deeply hurt by accusations that I only fix bugs, and don't add any
new features to Perl. The following changes, whose importance and
utility are self-evident, should refute any such claims.

- ams

--- current/keywords.pl~	Sun Aug 12 01:36:34 2001
+++ current/keywords.pl	Sun Aug 12 01:54:00 2001
@@ -271,3 +271,4 @@
 x
 xor
 y
+panic

--- current/opcode.pl~	Sun Aug 12 01:35:15 2001
+++ current/opcode.pl	Sun Aug 12 01:47:50 2001
@@ -660,6 +660,7 @@
 next		next			ck_null		ds}	
 redo		redo			ck_null		ds}	
 dump		dump			ck_null		ds}	
+panic		panic			ck_null		0
 goto		goto			ck_null		ds}	
 exit		exit			ck_exit		ds%	S?
 # continued below

--- current/toke.c~	Sun Aug 12 01:33:24 2001
+++ current/toke.c	Sun Aug 12 01:41:53 2001
@@ -4221,6 +4221,9 @@
 	    s = force_word(s,WORD,TRUE,FALSE,FALSE);
 	    LOOPX(OP_DUMP);
 
+	case KEY_panic:
+	    FUN0(OP_PANIC);
+
 	case KEY_else:
 	    PREBLOCK(ELSE);
 
@@ -5596,6 +5599,7 @@
 	    break;
 	case 5:
 	    if (strEQ(d,"print"))		return KEY_print;
+	    if (strEQ(d,"panic"))		return -KEY_panic;
 	    break;
 	case 6:
 	    if (strEQ(d,"printf"))		return KEY_printf;

--- current/pp_ctl.c~	Sun Aug 12 01:33:09 2001
+++ current/pp_ctl.c	Sun Aug 12 01:43:58 2001
@@ -2187,6 +2187,17 @@
     /*NOTREACHED*/
 }
 
+PP(pp_panic)
+{
+
+    Perl_croak(aTHX_
+		"              \\|/ ____ \\|/\n"
+		"              \"@'/ ,. \\`@\"\n"
+		"              /_| \\__/ |_\\\n"
+		"                 \\__U_/\n"
+    );
+}
+
 PP(pp_goto)
 {
     dSP;

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About