develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35753 - trunk/languages/perl6

From:
jonathan
Date:
January 19, 2009 06:30
Subject:
[svn:parrot] r35753 - trunk/languages/perl6
Message ID:
20090119142939.2AB35CB9AE@x12.develooper.com
Author: jonathan
Date: Mon Jan 19 06:29:37 2009
New Revision: 35753

Modified:
   trunk/languages/perl6/Test.pm

Log:
[rakudo] Make proclaim accept a junction rather than thread over it, but give a warning; moritz++ for input on how to handle this.

Modified: trunk/languages/perl6/Test.pm
==============================================================================
--- trunk/languages/perl6/Test.pm	(original)
+++ trunk/languages/perl6/Test.pm	Mon Jan 19 06:29:37 2009
@@ -195,10 +195,14 @@
     $eval_exception // $!;
 }
 
-sub proclaim($cond, $desc) {
+sub proclaim(Object $cond, $desc) {
     $testing_started  = 1;
     $num_of_tests_run = $num_of_tests_run + 1;
 
+    if $cond.HOW().isa($cond, Junction) {
+        warn("Junction passed to proclaim");
+    }
+
     unless $cond {
         print "not ";
         $num_of_tests_failed = $num_of_tests_failed + 1



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