r27452 - docs/Perl6/Spec

2009-07-06 Thread pugs-commits
Author: moritz
Date: 2009-07-06 23:44:32 +0200 (Mon, 06 Jul 2009)
New Revision: 27452

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[S03] use real Perl 6 syntax where possible

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-07-06 21:37:20 UTC (rev 27451)
+++ docs/Perl6/Spec/S03-operators.pod   2009-07-06 21:44:32 UTC (rev 27452)
@@ -3076,8 +3076,8 @@
 Any   Num   numeric equality+$_ == X
 Any   Str   string equality ~$_ eq X
 
-Hash  Pair  test hash mapping   $_{Xkey} ~~ Xval
-Any   Pair  test object attribute   .Xkey ~~ Xval (e.g. filetests)
+Hash  Pair  test hash mapping   $_{X.key} ~~ X.value
+Any   Pair  test object attribute   .X.key ~~ X.value (e.g. 
filetests)
 
 Set   Set   identical sets  $_ === X
 Hash  Set   hash keys same set  $_.keys === X



r27455 - docs/Perl6/Spec

2009-07-06 Thread pugs-commits
Author: moritz
Date: 2009-07-06 23:58:58 +0200 (Mon, 06 Jul 2009)
New Revision: 27455

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[S03] uhm, I should read more carefully what I correct

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-07-06 21:46:43 UTC (rev 27454)
+++ docs/Perl6/Spec/S03-operators.pod   2009-07-06 21:58:58 UTC (rev 27455)
@@ -3077,7 +3077,7 @@
 Any   Str   string equality ~$_ eq X
 
 Hash  Pair  test hash mapping   $_{X.key} ~~ X.value
-Any   Pair  test object attribute   .X.key ~~ X.value (e.g. 
filetests)
+Any   Pair  test object attribute   .{X.key} ~~ X.value (e.g. 
filetests)
 
 Set   Set   identical sets  $_ === X
 Hash  Set   hash keys same set  $_.keys === X



r27456 - docs/Perl6/Spec/S32-setting-library

2009-07-06 Thread pugs-commits
Author: masak
Date: 2009-07-07 00:10:57 +0200 (Tue, 07 Jul 2009)
New Revision: 27456

Modified:
   docs/Perl6/Spec/S32-setting-library/Str.pod
Log:
[S32/Str] added $format defaults to .fmt methods

Modified: docs/Perl6/Spec/S32-setting-library/Str.pod
===
--- docs/Perl6/Spec/S32-setting-library/Str.pod 2009-07-06 21:58:58 UTC (rev 
27455)
+++ docs/Perl6/Spec/S32-setting-library/Str.pod 2009-07-06 22:10:57 UTC (rev 
27456)
@@ -513,10 +513,12 @@
 
 =item fmt
 
-  our Str multi method fmt( Scalar $scalar: Str $format )
-  our Str multi method fmt( List $list: Str $format, Str $separator = ' ' )
-  our Str multi method fmt( Hash $hash: Str $format, Str $separator = \n )
-  our Str multi method fmt( Pair $pair: Str $format )
+  our Str multi method fmt( Scalar $scalar: Str $format = '%s' )
+  our Str multi method fmt( List $list: Str $format = '%s',
+Str $separator = ' ' )
+  our Str multi method fmt( Hash $hash: Str $format = %s\t%s,
+Str $separator = \n )
+  our Str multi method fmt( Pair $pair: Str $format = %s\t%s )
 
 A set of wrappers around Csprintf. A call to the scalar version
 C$o.fmt($format) returns the result of Csprintf($format, $o). A call to



smart match questions/inconsistencies

2009-07-06 Thread Moritz Lenz
Hi,

while writing some tests for the smartmatch operator, I noticed this item:

Any   * block signature match   block successfully binds to |$_

which block is this talking about? the current ?BLOCK? Somehow this
doesn't make much sense to me.


I also noticed that the slice operations aren't fully consistent:
Any   .{...}hash value slice truth  ?all(X)  i.e. ?all(.{...})
...
Array Hash  hash slice existenceX.{any @$_}:exists

Is there a good reason why it's all() in the first case, and any() in
the second?

Cheers,
Moritz