develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33682 - in branches/assign/languages/perl6: . src/classes

From:
pmichaud
Date:
December 8, 2008 18:17
Subject:
[svn:parrot] r33682 - in branches/assign/languages/perl6: . src/classes
Message ID:
20081209021737.15A04CB9AF@x12.develooper.com
Author: pmichaud
Date: Mon Dec  8 18:17:35 2008
New Revision: 33682

Modified:
   branches/assign/languages/perl6/Test.pm
   branches/assign/languages/perl6/src/classes/Failure.pir

Log:
[rakudo]:  Add $*WARNINGS global to turn warnings on/off for now.


Modified: branches/assign/languages/perl6/Test.pm
==============================================================================
--- branches/assign/languages/perl6/Test.pm	(original)
+++ branches/assign/languages/perl6/Test.pm	Mon Dec  8 18:17:35 2008
@@ -11,6 +11,8 @@
 our $todo_upto_test_num = 0;
 our $todo_reason = '';
 
+our $*WARNINGS = 0;
+
 # for running the test suite multiple times in the same process
 our $testing_started;
 

Modified: branches/assign/languages/perl6/src/classes/Failure.pir
==============================================================================
--- branches/assign/languages/perl6/src/classes/Failure.pir	(original)
+++ branches/assign/languages/perl6/src/classes/Failure.pir	Mon Dec  8 18:17:35 2008
@@ -9,6 +9,9 @@
     p6meta.'register'('Undef', 'parent'=>failureproto, 'protoobject'=>failureproto)
     exceptionproto = p6meta.'new_class'('Perl6Exception', 'parent'=>'Any', 'attr'=>'$!exception')
     p6meta.'register'('Exception', 'protoobject'=>exceptionproto)
+
+    $P0 = box 1
+    set_hll_global '$WARNINGS', $P0
 .end
 
 
@@ -46,6 +49,8 @@
 .sub '!throw_unhandled' :method
     $I0 = self.'handled'()
     if $I0 goto done
+    $P0 = get_hll_global '$WARNINGS'
+    unless $P0 goto done
     $P0 = self.'!exception'()
     $S0 = $P0['message']
     $S0 = concat $S0, "\n"



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