Browse files

* changed ??:: to ??!! in docs, ext and modules.

git-svn-id: http://svn.pugscode.org/pugs@6852 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent cf6d2ac commit 7f51c09603debb9bddb459d7fad3d989e7458bd8 bsmith committed Sep 8, 2005
Showing with 154 additions and 154 deletions.
  1. +3 −3 docs/AES/A20draft.pod
  2. +1 −1 docs/AES/S29draft.pod
  3. +1 −1 docs/notes/recursive_polymorphism_and_type_inference
  4. +1 −1 docs/other/porting_howto
  5. +2 −2 docs/quickref/op
  6. +1 −1 docs/quickref/unicode
  7. +2 −2 docs/talks/Apocalypse_Now.spork
  8. +3 −3 docs/talks/Perl6_the_Ultimate.spork
  9. +1 −1 docs/talks/oscon-apocalypse.spork
  10. +1 −1 docs/talks/perl6-apw2005/code/op/euler.pl
  11. +2 −2 docs/talks/perl6-apw2005/code/op/op-arten3.pl
  12. +1 −1 docs/talks/perl6-apw2005/code/test.pl
  13. +1 −1 ext/Benchmark/lib/Benchmark.pm
  14. +2 −2 ext/CGI/lib/CGI.pm
  15. +2 −2 ext/CGI/lib/CGI/Util.pm
  16. +3 −3 ext/DateTime/lib/Date.pm
  17. +1 −1 ext/File-Spec/lib/File/Spec/Unix.pm
  18. +2 −2 ext/File-Spec/lib/File/Spec/Win32.pm
  19. +1 −1 ext/FindBin/lib/FindBin.pm
  20. +3 −3 ext/HTML-Entities/lib/HTML/Entities.pm
  21. +2 −2 ext/Locale-KeyedText/lib/Locale/KeyedText.pm
  22. +4 −4 ext/Locale-KeyedText/t/lib/t_LKT_Util.pm
  23. +1 −1 ext/Module-Pluggable-Fast/lib/Module/Pluggable/Fast.pm
  24. +1 −1 ext/Net-IRC/lib/Net/IRC-OO.pm
  25. +1 −1 ext/Net-IRC/lib/Net/IRC.pm
  26. +2 −2 ext/Net-IRC/lib/Net/IRC/SeenExt.pm
  27. +1 −1 ext/Perl-Compiler/lib/Perl/Compiler/PIL/Util.pm
  28. +2 −2 ext/Perl6-Container-Array/lib/Perl6/Container/Array.pm
  29. +1 −1 ext/Perl6-Container-Array/t/array-operations.t
  30. +1 −1 ext/Perl6-Value-List/lib/Perl6/Value/List.pm
  31. +1 −1 ext/Perl6-Value-List/t/array-operations.t
  32. +1 −1 ext/Perldoc/lib/Perldoc/DOM/Node.pm
  33. +6 −6 ext/Recurrence/lib/Recurrence.pm
  34. +4 −4 ext/Recurrence/t/recurrence-grep.t
  35. +4 −4 ext/Recurrence/t/recurrence-negate.t
  36. +8 −8 ext/Recurrence/t/recurrence.t
  37. +8 −8 ext/Recurrence/t/unicode.t
  38. +1 −1 ext/Set-Infinite/lib/Set/Infinite.pm
  39. +8 −8 ext/Set-Infinite/t/set-infinite-recurrence.t
  40. +1 −1 ext/Set/lib/Set/Hash.pm
  41. +2 −2 ext/Span/lib/Span.pm
  42. +2 −2 ext/Span/lib/Span/Code.pm
  43. +6 −6 ext/Span/lib/Span/Int.pm
  44. +4 −4 ext/Span/lib/Span/Num.pm
  45. +8 −8 ext/Span/t/span-code.t
  46. +2 −2 ext/Test-Builder/lib/Test/Builder/Test.pm
  47. +7 −7 ext/Test/lib/Test.pm
  48. +7 −7 ext/Text-Glob/lib/Text/Glob.pm
  49. +1 −1 ext/Tree/lib/Tree.pm
  50. +1 −1 ext/URI/lib/URI/Escape.pm
  51. +1 −1 ext/WTemplate/lib/WTemplate.pm
  52. +1 −1 ext/libwww-perl/lib/HTTP/Cookies.pm
  53. +4 −4 ext/libwww-perl/lib/HTTP/Headers.pm
  54. +2 −2 ext/libwww-perl/lib/HTTP/Message.pm
  55. +1 −1 ext/libwww-perl/lib/HTTP/Query.pm
  56. +1 −1 ext/libwww-perl/lib/HTTP/Request.pm
  57. +2 −2 modules/Date/lib/Date/Gregorian.pod
  58. +3 −3 modules/Date/t/01sanity.t
  59. +3 −3 modules/Grammars/MatchX.pm
  60. +2 −2 modules/JavaScript-FrontEnd/ARuntime.pm
  61. +1 −1 modules/Perl-MetaModel/docs/meta_meta_classes.pod
  62. +1 −1 modules/Perl-MetaModel/lib/Array.pm
View
6 docs/AES/A20draft.pod
@@ -32,13 +32,13 @@ infectious traits, enabling the implementation of taint mode and more complex va
With taint mode generalized into a debugging system, this perl statement will
yield:
- $x = ($a ?? $b :: $c); # assuming $a is true
+ $x = ($a ?? $b !! $c); # assuming $a is true
Assuming:
Xs is the whole statement
Xe is the single expression in Xs, it is apply(=, $x, ...);
- E is the ( ?? :: ) expression, it is apply(??::, A, B, C);
+ E is the ( ?? !! ) expression, it is apply(??!!, A, B, C);
A, B, C are expressions for the vars $a, $b, $c ($x expr omitted for brevity)
The following callbacks:
@@ -47,7 +47,7 @@ The following callbacks:
eval(Xs);
eval(Xe);
eval(E);
- apply(??::, A, B, C);
+ apply(??!!, A, B, C);
eval(A);
# evaluated
participated(A, $a); # $a is a value, perhaps is copy
View
2 docs/AES/S29draft.pod
@@ -497,7 +497,7 @@ details and examples.
multi sub Lists::zip (: Array *@lists, Bit +$shortest) returns Lazy {
gather {
- while $shortest ?? all (@lists) :: any(@lists) {
+ while $shortest ?? all (@lists) !! any(@lists) {
for @lists -> @list {
take shift @list;
}
View
2 docs/notes/recursive_polymorphism_and_type_inference
@@ -138,7 +138,7 @@ Then, to write visitors, you can use multis:
multi run ($v`pred) { run($v) - 1 }
multi run ($v`iszero) { run($v) == 0 }
multi run (`cond:($c, $true, $false)) {
- run($c) ?? run($true) :: run($false);
+ run($c) ?? run($true) !! run($false);
}
Hmmm.. this imples some sort of signature-signature binding. What I'd
View
2 docs/other/porting_howto
@@ -14,7 +14,7 @@ Mini HowTo: How to port Perl 5 modules to Perl 6
- Often, the translation of P5 -> P6 is quite mechanic:
- $array[idx] -> @array[idx]
- scalar @foo -> +@foo # or @foo.elems
- - a ? b : c -> a ?? b :: c
+ - a ? b : c -> a ?? b !! c
- $self->method(...) -> .method(...)
- sub { my ($self, $a, $b) = @_; ... } ->
method($a, $b) { ... }
View
4 docs/quickref/op
@@ -14,7 +14,7 @@ Precedence
chaining binary != == < <= > >= ~~ !~ eq ne lt le gt ge =:=
tight and &&
tight or || ^^ //
- ternary ?? ::
+ ternary ?? !!
assignment = := ::= += -= **= xx= etc.
list item separator , �
list op (rightward) <== [+] print push any all true not etc.
@@ -100,7 +100,7 @@ Logic operators
// err # infix (defined-or)
! not # prefix
? true # prefix
- ?? :: # ternary
+ ?? !! # ternary
Quote-like operators
View
2 docs/quickref/unicode
@@ -68,7 +68,7 @@ be abused; however ❝cute❞ it might be…
⟪ ⟫ « » (er, I mean << >> ;-) )
→ ->
‼ !(!($a)) (ie, cast to boolean)
- ⁇ ∷ ?? ::
+ ⁇ ∷ ?? !!
∥ || or //
¹ **1 (as these glyphs are just "superscript 1" etc)
² **2 C-x ^ 2
View
4 docs/talks/Apocalypse_Now.spork
@@ -295,7 +295,7 @@ Autrijus Tang
+* Interactive mode:
% pugs
- pugs> { $_ ?? $_ * &?BLOCK( $_ - 1 ) :: 1 }.(10)
+ pugs> { $_ ?? $_ * &?BLOCK( $_ - 1 ) !! 1 }.(10)
3628800
----
@@ -683,7 +683,7 @@ Perl-Compiler Tree
+* Unicode operators
sub prefix:<Σ> (@x) { sum(@x) }
- sub postfix:<!> ($n) { ($n < 2) ?? 1 :: $n * ($n-1)! }
+ sub postfix:<!> ($n) { ($n < 2) ?? 1 !! $n * ($n-1)! }
say( Σ 1..5! ); # 7260
(1, 2) ¥ ('a', 'b'); # (1, 'a', 2, 'b')
View
6 docs/talks/Perl6_the_Ultimate.spork
@@ -384,7 +384,7 @@ presentation_date: March 27th, 2005
+* 萬國碼算符
sub prefix:<Σ> (@x) { sum(@x) }
- sub postfix:<!> ($n) { ($n < 2) ?? 1 :: $n * ($n-1)! }
+ sub postfix:<!> ($n) { ($n < 2) ?? 1 !! $n * ($n-1)! }
say( Σ 1..5! ); # 7260
(1, 2) ¥ ('a', 'b'); # (1, 'a', 2, 'b')
@@ -406,7 +406,7 @@ presentation_date: March 27th, 2005
+* 三元算符
- $x ?? $y :: $z;
+ $x ?? $y !! $z;
----
== Perl 6: 字串
@@ -905,7 +905,7 @@ presentation_date: March 27th, 2005
+* 互動式界面
% pugs
- pugs> { $_ ?? $_ * &?BLOCK( $_ - 1 ) :: 1 }.(10)
+ pugs> { $_ ?? $_ * &?BLOCK( $_ - 1 ) !! 1 }.(10)
3628800
----
View
2 docs/talks/oscon-apocalypse.spork
@@ -510,7 +510,7 @@ tell($limit);
any(1 .. 100).pick() # pick random number between 1 and 100
# factorial with anon block
- my $fact = -> $n { $n < 2 ?? 1 :: $n * &?BLOCK($n - 1) };
+ my $fact = -> $n { $n < 2 ?? 1 !! $n * &?BLOCK($n - 1) };
$fact(10);
+* iblech
View
2 docs/talks/perl6-apw2005/code/op/euler.pl
@@ -1,6 +1,6 @@
#=euler.pl - Berechnung der Euler'schen Zahl in Perl 6
use v6;
-sub infix:«>?» ($a, $b) { $a > $b ?? $a :: $b }
+sub infix:«>?» ($a, $b) { $a > $b ?? $!!:: $b }
sub postfix:<!> ($x) { [*] 1..$x >? 1 }
sub e {
my $ret = 0;
View
4 docs/talks/perl6-apw2005/code/op/op-arten3.pl
@@ -8,5 +8,5 @@
say term:<PI>()
#=tertiärer Operator
-$wahr ?? $a :: $b # in Perl 5 war das $wahr ? $a : $b
-$wahr.tertiary:<?? ::>($a, $b) # keine Ahnung ob richtig!
+$wahr ?? $a !! $b # in Perl 5 war das $wahr ? $a : $b
+$wahr.tertiary:<?? !!>($a, $b) # keine Ahnung ob richtig!
View
2 docs/talks/perl6-apw2005/code/test.pl
@@ -1,7 +1,7 @@
# ads
# aasd
$a = "a#" ~ foo("test"); # test
-sub infix:«>?» ($a, $b) { $a > $b ?? $a :: $b }
+sub infix:«>?» ($a, $b) { $a > $b ?? $!!:: $b }
sub postfix:<!> ($x) { [*] 1..$x >? 1 };
# sechs mal in Perl 5 würfeln
@a = 0; push @a, wurf() for 1..6;
View
2 ext/Benchmark/lib/Benchmark.pm
@@ -26,7 +26,7 @@ sub _time_func ($loop) {
sub timethese ($count, %hash) is export {
for %hash.kv -> $name, $code {
my @time = timeit($count, $code);
- say "$name: { @time[0] != 0 ?? int($count / @time[0]) :: "Inf" }/s";
+ say "$name: { @time[0] != 0 ?? int($count / @time[0]) !! "Inf" }/s";
}
}
View
4 ext/CGI/lib/CGI.pm
@@ -88,10 +88,10 @@ sub header (
}
if ($cookies) {
- my @cookies = ($cookies !~ Array) ?? ($cookies) :: @{$cookies};
+ my @cookies = ($cookies !~ Array) ?? ($cookies) !! @{$cookies};
for @cookies -> $cookie {
- #$cookie = ($cookie ~~ CGI::Cookie) ?? $cookie.as_string :: $cookie;
+ #$cookie = ($cookie ~~ CGI::Cookie) ?? $cookie.as_string !! $cookie;
$header ~= "\nSet-Cookie: " ~ $cookie
unless $cookie eq "";
View
4 ext/CGI/lib/CGI/Util.pm
@@ -10,9 +10,9 @@ sub make_attribute(%attrs, Bool ?$escape = 0) is export {
$copy ~~ s:P5:g/_/-/;
- my $value = ($escape) ?? simple_escape(%attrs{$key}) :: %attrs{$key};
+ my $value = ($escape) ?? simple_escape(%attrs{$key}) !! %attrs{$key};
- push @return, (%attrs{$key}.defined) ?? qq/$copy="$value"/ :: qq/$copy/;
+ push @return, (%attrs{$key}.defined) ?? qq/$copy="$value"/ !! qq/$copy/;
}
return @return;
View
6 ext/DateTime/lib/Date.pm
@@ -58,7 +58,7 @@ multi submethod BUILD (Str $string) returns Date {
# day as Str where { rx:i/^last$/ }
multi submethod BUILD (Int +$year, Int +$month = 1, Int|Str +$day is copy = 1) returns Date {
if $day ~~ rx:perl5<i>/^last$/ {
- my @lengths := _is_leap_year($year) ?? @LeapYearMonthLengths :: @MonthLengths;
+ my @lengths := _is_leap_year($year) ?? @LeapYearMonthLengths !! @MonthLengths;
$day = @lengths[ $month - 1 ];
}
@@ -103,13 +103,13 @@ method quarter () returns Int {
method day_of_quarter () returns Int {
my $doy = $_.day_of_year();
- my @doy := _is_leap_year($.year) ?? @PreviousMonthDoLY :: @PreviousMonthDoY;
+ my @doy := _is_leap_year($.year) ?? @PreviousMonthDoLY !! @PreviousMonthDoY;
return $doy - @doy[ ( 3 * $_.quarter() ) - 3 ];
}
method day_of_year () returns Int {
- my @doy := _is_leap_year($.year) ?? @PreviousMonthDoLY :: @PreviousMonthDoY;
+ my @doy := _is_leap_year($.year) ?? @PreviousMonthDoLY !! @PreviousMonthDoY;
@doy[$.month - 1] + $.day;
}
View
2 ext/File-Spec/lib/File/Spec/Unix.pm
@@ -155,7 +155,7 @@ sub file_name_is_absolute (Str $file) returns Bool is export {
sub path returns Array is export {
return unless %*ENV{'PATH'}.defined;
- return split(':', %*ENV{'PATH'}).map:{ $_ eq '' ?? '.' :: $_ };
+ return split(':', %*ENV{'PATH'}).map:{ $_ eq '' ?? '.' !! $_ };
}
# This HACK is worse than
View
4 ext/File-Spec/lib/File/Spec/Win32.pm
@@ -84,7 +84,7 @@ sub catpath (Str $volume, Str $directory, Str $file) returns Str is export {
$file ~~ rx:perl5{[^\\/]}
) {
$vol ~~ rx:perl5{([\\/])};
- my $sep = $0 ?? $0 :: "\\";
+ my $sep = $0 ?? $0 !! "\\";
$vol ~= $sep;
}
$vol ~= $file;
@@ -149,7 +149,7 @@ sub no_upwards (*@filenames) returns Array is export {
sub path returns Array is export {
my $path = %*ENV{'PATH'} || %*ENV{'Path'} || %*ENV{'path'};
- return split(';', $path).map:{ $_ eq '' ?? '.' :: $_ };
+ return split(';', $path).map:{ $_ eq '' ?? '.' !! $_ };
}
sub file_name_is_absolute (Str $file) returns Bool is export {
View
2 ext/FindBin/lib/FindBin.pm
@@ -58,7 +58,7 @@ sub init {
last unless defined $linktext;
$script = file_name_is_absolute($linktext)
?? $linktext
- :: catfile( $RealBin, $linktext );
+ !! catfile( $RealBin, $linktext );
}
$Bin = rel2abs($Bin) if $Bin;
$RealBin = rel2abs($RealBin) if $RealBin;
View
6 ext/HTML-Entities/lib/HTML/Entities.pm
@@ -285,7 +285,7 @@ multi sub decode_entities($string is rw) is export
my $result = $string;
$result ~~ s:perl5:g/&\#(\d+);?/{chr($0)}/;
- $result ~~ s:perl5:g/(&\#[xX]([0-9a-fA-F]+);?)/{my $c = hex($1); $c < 256 ?? chr($c) :: $0}/;
+ $result ~~ s:perl5:g/(&\#[xX]([0-9a-fA-F]+);?)/{my $c = hex($1); $c < 256 ?? chr($c) !! $0}/;
$result ~~ s:perl5:g/(&(\w+);?)/{%entity_to_char{$1} // $0}/;
$string = $result;
@@ -332,15 +332,15 @@ sub encode_entities (Str $string is rw, ?$unsafe_chars) is export
$result ~~ s:perl5:g/([$unsafe_chars])/{
%char_to_entity.exists($0)
?? %char_to_entity{$0}
- :: num_entity($0)
+ !! num_entity($0)
}/;
}
else {
# Encode control chars, high bit chars and '<', '&', '>', '"'
$result ~~ s:perl5:g/([^\n\r\t !\#\$%\'-;=?-~])/{
%char_to_entity.exists($0)
?? %char_to_entity{$0}
- :: num_entity($0)
+ !! num_entity($0)
}/;
}
$string = $result;
View
4 ext/Locale-KeyedText/lib/Locale/KeyedText.pm
@@ -69,13 +69,13 @@ class Locale::KeyedText::Translator {
method new( $class: Any $set_names is rw, Any $member_names is rw ) returns Locale::KeyedText::Translator {
- my $set_names_copy = $set_names.does(Array) ?? [@{$set_names}] :: [$set_names];
+ my $set_names_copy = $set_names.does(Array) ?? [@{$set_names}] !! [$set_names];
+$set_names_copy > 0 or return;
for $set_names_copy -> $set_name {
$set_name.defined or return;
}
- my $member_names_copy = $member_names.does(Array) ?? [@{$member_names}] :: [$member_names];
+ my $member_names_copy = $member_names.does(Array) ?? [@{$member_names}] !! [$member_names];
+$member_names_copy > 0 or return;
for $member_names_copy -> $member_name {
$member_name.defined or return;
View
8 ext/Locale-KeyedText/t/lib/t_LKT_Util.pm
@@ -18,13 +18,13 @@ sub serialize( Any $input is rw ) returns Str {
return [
!$input.defined ??
'undef, '
- :: $input.does(Hash) ??
+ !! $input.does(Hash) ??
( '{ ', ( $input.pairs.sort.map:{ serialize( $_ ) } ), '}, ' )
- :: $input.does(Pair) || $input.ref eq 'Array::Const' ?? # Slice not does(Pair) right now
+ !! $input.does(Pair) || $input.ref eq 'Array::Const' ?? # Slice not does(Pair) right now
'\''~$input.key~'\' => \''~$input.value~'\', '
- :: $input.does(Array) ??
+ !! $input.does(Array) ??
( '[ ', ( $input.map:{ serialize( $_ ) } ), '], ' )
- :: '\''~$input~'\', '
+ !! '\''~$input~'\', '
].join( '' );
}
View
2 ext/Module-Pluggable-Fast/lib/Module/Pluggable/Fast.pm
@@ -37,7 +37,7 @@ method plugins {
};
unless %plugins{$class} {
%plugins{$class} =
- $.require ?? $class :: $.callback.($class);
+ $.require ?? $class !! $.callback.($class);
}
# XXX: add advanced class detection
}
View
2 ext/Net-IRC/lib/Net/IRC-OO.pm
@@ -483,7 +483,7 @@ class Net::IRC {
submethod BUILD(Bool ?$.floodcontrol = 0) {
$:bucket = $.floodcontrol
?? Bucket.new(rate => (1/2), burst_size => 5)
- :: Bucket.new(rate => (1000/2), burst_size => 5000); # hack
+ !! Bucket.new(rate => (1000/2), burst_size => 5000); # hack
$:bucket.fill;
}
View
2 ext/Net-IRC/lib/Net/IRC.pm
@@ -493,7 +493,7 @@ sub new_queue(Bool ?$floodcontrol = 0) {
my $bucket = $floodcontrol
?? Algorithm::TokenBucket::new_bucket(rate => (1/2), burst_size => 5)
- :: Algorithm::TokenBucket::new_bucket(rate => (1000/2), burst_size => 5000); # hack
+ !! Algorithm::TokenBucket::new_bucket(rate => (1000/2), burst_size => 5000); # hack
$bucket<fill>();
# "Instance methods"
View
4 ext/Net-IRC/lib/Net/IRC/SeenExt.pm
@@ -13,10 +13,10 @@ submethod BUILD() {
} if $sent_to_a_chan;
if $public and $event<rest> ~~ rx:Perl5/^\?seen\s+([^ ]+)/ {
- my $reply_to = $sent_to_a_chan ?? $event<object> :: $event<from_nick>;
+ my $reply_to = $sent_to_a_chan ?? $event<object> !! $event<from_nick>;
my $reply_msg = %:seen{$0}
?? "$0 was last seen {time() - %:seen{./normalize($0)}<date>} seconds ago, saying: %seen{./normalize($0)}<text>"
- :: "Never seen $0.";
+ !! "Never seen $0.";
./notice(to => $reply_to, text => $reply_msg);
}
});
View
2 ext/Perl-Compiler/lib/Perl/Compiler/PIL/Util.pm
@@ -8,7 +8,7 @@ class Perl::Compiler::PIL::Util::Pad {
$?SELF;
}
else {
- $.parent ?? $.parent.lookup_pad($name) :: fail;
+ $.parent ?? $.parent.lookup_pad($name) !! fail;
}
}
}
View
4 ext/Perl6-Container-Array/lib/Perl6/Container/Array.pm
@@ -142,7 +142,7 @@ method elems ( $array: ) {
my $count = 0;
for $.items {
$count += $_.isa( 'Perl6::Value::List' ) ??
- $_.Perl6::Value::List::elems ::
+ $_.Perl6::Value::List::elems !!
1;
}
$count;
@@ -261,7 +261,7 @@ method store ( $array: Int $pos, $item ) {
method reverse ( $array: ) {
my $rev = Perl6::Array::reverse $array.items;
$rev = $rev.Perl6::Array::map:{
- $_.isa('Perl6::Value::List') ?? $_.Perl6::Value::List::reverse :: $_
+ $_.isa('Perl6::Value::List') ?? $_.Perl6::Value::List::reverse !! $_
};
return Perl6::Container::Array.from_list( @{$rev} );
}
View
2 ext/Perl6-Container-Array/t/array-operations.t
@@ -26,7 +26,7 @@ use Perl6::Value::List;
is( $grepped.shift, 0, 'grep 0' );
is( $grepped.shift, 3, 'grep 1' );
- my $mapped = $grepped.map:{ $_ % 6 == 0 ?? ($_, $_) :: () };
+ my $mapped = $grepped.map:{ $_ % 6 == 0 ?? ($_, $_) !! () };
is( $mapped.shift, 6, 'map 0' );
is( $mapped.shift, 6, 'map 1' );
is( $mapped.shift, 12, 'map 0' );
View
2 ext/Perl6-Value-List/lib/Perl6/Value/List.pm
@@ -67,7 +67,7 @@ class Perl6::Value::List {
{
unless defined $.celems {
$.celems =
- ( defined $.cstart || defined $.cend ) ?? sub { Inf } :: sub { 0 }
+ ( defined $.cstart || defined $.cend ) ?? sub { Inf } !! sub { 0 }
}
$.cstart = sub {} unless defined $.cstart;
$.cend = sub {} unless defined $.cend;
View
2 ext/Perl6-Value-List/t/array-operations.t
@@ -22,7 +22,7 @@ use Perl6::Value::List;
is( $grepped.shift, 0, 'grep ' );
is( $grepped.shift, 3, 'grep 0' );
- my $mapped = $grepped.map:{ $_ % 6 == 0 ?? ($_, $_) :: () };
+ my $mapped = $grepped.map:{ $_ % 6 == 0 ?? ($_, $_) !! () };
is( $mapped.shift, 6, 'map 0' );
is( $mapped.shift, 6, 'map 1' );
is( $mapped.shift, 12, 'map 0' );
View
2 ext/Perldoc/lib/Perldoc/DOM/Node.pm
@@ -16,7 +16,7 @@ method dom_attr($self:) returns Hash {
{ $self.dom_fields.map:{
my $val = eval '$self.'~$_;
say "warning: error $!" if $!;
- ($val.defined ?? ($_ => $self.($_)) :: ())
+ ($val.defined ?? ($_ => $self.($_)) !! ())
} };
}
View
12 ext/Recurrence/lib/Recurrence.pm
@@ -198,7 +198,7 @@ method contains ($self: $x ) returns bool {
method closest ($self: $x ) {
my $n = $self.next( $x );
my $p = $self.current( $x );
- return $n - $x < $x - $p ?? $n :: $p;
+ return $n - $x < $x - $p ?? $n !! $p;
}
method is_empty ($self: ) {
@@ -224,7 +224,7 @@ submethod _get_union ( $closure1, $closure2, $direction ) {
return sub ( $x is copy ) {
my $n1 = &{ $closure1 }( $x );
my $n2 = &{ $closure2 }( $x );
- return ( $n1 <=> $n2 ) == $direction ?? $n1 :: $n2;
+ return ( $n1 <=> $n2 ) == $direction ?? $n1 !! $n2;
}
}
@@ -303,10 +303,10 @@ Recurrence - An object representing an infinite recurrence set
# all non-zero integers
$non_zero = Recurrence.new(
- closure_next => sub ($x) { $x == -1 ?? 1 :: $x + 1 },
- closure_previous => sub ($x) { $x == 1 ?? -1 :: $x - 1 },
- complement_next => sub ($x) { $x < 0 ?? 0 :: Inf },
- complement_previous => sub ($x) { $x > 0 ?? 0 :: -Inf },
+ closure_next => sub ($x) { $x == -1 ?? 1 !! $x + 1 },
+ closure_previous => sub ($x) { $x == 1 ?? -1 !! $x - 1 },
+ complement_next => sub ($x) { $x < 0 ?? 0 !! Inf },
+ complement_previous => sub ($x) { $x > 0 ?? 0 !! -Inf },
universe => $universe );
# TODO - test this
View
8 ext/Recurrence/t/recurrence-grep.t
@@ -19,10 +19,10 @@ my $universe = Recurrence.new(
{
# 0 .. Inf
my $span = Recurrence.new(
- closure_next => sub { $_ >= 0 ?? $_ + 1 :: 0 },
- closure_previous => sub { $_ > 0 ?? $_ - 1 :: -Inf },
- complement_next => sub { $_ < 1 ?? $_ + 1 :: Inf },
- complement_previous => sub { $_ < 0 ?? $_ - 1 :: -1 },
+ closure_next => sub { $_ >= 0 ?? $_ + 1 !! 0 },
+ closure_previous => sub { $_ > 0 ?? $_ - 1 !! -Inf },
+ complement_next => sub { $_ < 1 ?? $_ + 1 !! Inf },
+ complement_previous => sub { $_ < 0 ?? $_ - 1 !! -1 },
universe => $universe );
my $span1 = $span.grep:{
View
8 ext/Recurrence/t/recurrence-negate.t
@@ -19,10 +19,10 @@ my $universe = Recurrence.new(
{
# 0 .. Inf
my $span1 = Recurrence.new(
- closure_next => sub { $_ >= 0 ?? $_ + 1 :: 0 },
- closure_previous => sub { $_ > 0 ?? $_ - 1 :: -Inf },
- complement_next => sub { $_ < 1 ?? $_ + 1 :: Inf },
- complement_previous => sub { $_ < 0 ?? $_ - 1 :: -1 },
+ closure_next => sub { $_ >= 0 ?? $_ + 1 !! 0 },
+ closure_previous => sub { $_ > 0 ?? $_ - 1 !! -Inf },
+ complement_next => sub { $_ < 1 ?? $_ + 1 !! Inf },
+ complement_previous => sub { $_ < 0 ?? $_ - 1 !! -1 },
universe => $universe );
is( $span1.start, 0, "start" );
View
16 ext/Recurrence/t/recurrence.t
@@ -65,21 +65,21 @@ is( $odd_numbers.previous( 10 ), 9, 'odd even' );
{
# 0 .. Inf
my $span1 = Recurrence.new(
- closure_next => sub { $_ >= 0 ?? $_ + 1 :: 0 },
- closure_previous => sub { $_ > 0 ?? $_ - 1 :: -Inf },
- complement_next => sub { $_ < 1 ?? $_ + 1 :: Inf },
- complement_previous => sub { $_ < 0 ?? $_ - 1 :: -1 },
+ closure_next => sub { $_ >= 0 ?? $_ + 1 !! 0 },
+ closure_previous => sub { $_ > 0 ?? $_ - 1 !! -Inf },
+ complement_next => sub { $_ < 1 ?? $_ + 1 !! Inf },
+ complement_previous => sub { $_ < 0 ?? $_ - 1 !! -1 },
universe => $universe );
is( $span1.start, 0, "start" );
is( $span1.end , Inf, "end" );
# -Inf .. 10
my $span3 = Recurrence.new(
- closure_next => sub { $_ < 10 ?? $_ + 1 :: Inf },
- closure_previous => sub { $_ < 11 ?? $_ - 1 :: 10 },
- complement_next => sub { $_ >= 10 ?? $_ + 1 :: 11 },
- complement_previous => sub { $_ > 11 ?? $_ - 1 :: -Inf },
+ closure_next => sub { $_ < 10 ?? $_ + 1 !! Inf },
+ closure_previous => sub { $_ < 11 ?? $_ - 1 !! 10 },
+ complement_next => sub { $_ >= 10 ?? $_ + 1 !! 11 },
+ complement_previous => sub { $_ > 11 ?? $_ - 1 !! -Inf },
universe => $universe );
is( $span3.start, -Inf, "start" );
View
16 ext/Recurrence/t/unicode.t
@@ -26,18 +26,18 @@ my $odd_numbers = $even_numbers.complement;
{
# 0 .. Inf
my $span1 = Recurrence.new(
- closure_next => sub { $_ >= 0 ?? $_ + 1 :: 0 },
- closure_previous => sub { $_ > 0 ?? $_ - 1 :: -Inf },
- complement_next => sub { $_ < 1 ?? $_ + 1 :: Inf },
- complement_previous => sub { $_ < 0 ?? $_ - 1 :: -1 },
+ closure_next => sub { $_ >= 0 ?? $_ + 1 !! 0 },
+ closure_previous => sub { $_ > 0 ?? $_ - 1 !! -Inf },
+ complement_next => sub { $_ < 1 ?? $_ + 1 !! Inf },
+ complement_previous => sub { $_ < 0 ?? $_ - 1 !! -1 },
universe => $universe );
# -Inf .. 10
my $span3 = Recurrence.new(
- closure_next => sub { $_ < 10 ?? $_ + 1 :: Inf },
- closure_previous => sub { $_ < 11 ?? $_ - 1 :: 10 },
- complement_next => sub { $_ >= 10 ?? $_ + 1 :: 11 },
- complement_previous => sub { $_ > 11 ?? $_ - 1 :: -Inf },
+ closure_next => sub { $_ < 10 ?? $_ + 1 !! Inf },
+ closure_previous => sub { $_ < 11 ?? $_ - 1 !! 10 },
+ complement_next => sub { $_ >= 10 ?? $_ + 1 !! 11 },
+ complement_previous => sub { $_ > 11 ?? $_ - 1 !! -Inf },
universe => $universe );
{
View
2 ext/Set-Infinite/lib/Set/Infinite.pm
@@ -196,7 +196,7 @@ method current ($self: $x ) {
method closest ($self: $x ) {
my $n = $self.next( $x );
my $p = $self.current( $x );
- return $n - $x < $x - $p ?? $n :: $p;
+ return $n - $x < $x - $p ?? $n !! $p;
}
method iterator ($self: ) returns Set::Infinite::Iterator {
View
16 ext/Set-Infinite/t/set-infinite-recurrence.t
@@ -247,21 +247,21 @@ is( $odd_numbers.previous( 10 ), 9, 'odd recurrence' );
{
# 0 .. Inf
my $span1 = Span::Code.new(
- closure_next => sub { $_ >= 0 ?? $_ + 1 :: 0 },
- closure_previous => sub { $_ > 0 ?? $_ - 1 :: -Inf },
- complement_next => sub { $_ < 1 ?? $_ + 1 :: Inf },
- complement_previous => sub { $_ < 0 ?? $_ - 1 :: -1 },
+ closure_next => sub { $_ >= 0 ?? $_ + 1 !! 0 },
+ closure_previous => sub { $_ > 0 ?? $_ - 1 !! -Inf },
+ complement_next => sub { $_ < 1 ?? $_ + 1 !! Inf },
+ complement_previous => sub { $_ < 0 ?? $_ - 1 !! -1 },
universe => $universe );
is( $span1.start, 0, "start" );
is( $span1.end , Inf, "end" );
# -Inf .. 10
my $span3 = Span::Code.new(
- closure_next => sub { $_ < 10 ?? $_ + 1 :: Inf },
- closure_previous => sub { $_ < 11 ?? $_ - 1 :: 10 },
- complement_next => sub { $_ >= 10 ?? $_ + 1 :: 11 },
- complement_previous => sub { $_ > 11 ?? $_ - 1 :: -Inf },
+ closure_next => sub { $_ < 10 ?? $_ + 1 !! Inf },
+ closure_previous => sub { $_ < 11 ?? $_ - 1 !! 10 },
+ complement_next => sub { $_ >= 10 ?? $_ + 1 !! 11 },
+ complement_previous => sub { $_ > 11 ?? $_ - 1 !! -Inf },
universe => $universe );
is( $span3.start, -Inf, "start" );
View
2 ext/Set/lib/Set/Hash.pm
@@ -27,7 +27,7 @@ method members() returns List {
# does not seem to get initialized properly
# and calling members before any values are
# set results in a error
- %:members ?? %:members.values :: ();
+ %:members ?? %:members.values !! ();
}
# NOTE:
View
4 ext/Span/lib/Span.pm
@@ -228,7 +228,7 @@ method size () returns Object {
sub _normalize_parameter ( $self, $param ) {
# TODO - reorder these rules or move to the subclasses
- my $span0 = $self.isa( 'Span' ) ?? $self.span :: $self;
+ my $span0 = $self.isa( 'Span' ) ?? $self.span !! $self;
my $span1 = $param;
# say "normalize ", $span0, $span1;
if $span1.isa( 'Recurrence' ) {
@@ -347,7 +347,7 @@ method current ( $x ) {
method closest ($self: $x ) {
my $n = $self.next( $x );
my $p = $self.current( $x );
- return $n - $x < $x - $p ?? $n :: $p;
+ return $n - $x < $x - $p ?? $n !! $p;
}
method iterator ($self: ) returns Span::Iterator {
View
4 ext/Span/lib/Span/Code.pm
@@ -57,12 +57,12 @@ method is_empty ($self: ) {
method start ($self: ) {
my $tmp = $self.next( -Inf );
- return $tmp == Inf ?? undef :: $tmp;
+ return $tmp == Inf ?? undef !! $tmp;
}
method end ($self: ) {
my $tmp = $self.previous( Inf );
- return $tmp == -Inf ?? undef :: $tmp;
+ return $tmp == -Inf ?? undef !! $tmp;
}
method start_is_closed () { return bool::true }
View
12 ext/Span/lib/Span/Int.pm
@@ -20,8 +20,8 @@ method end_is_closed () { return bool::true }
method end_is_open () { return bool::false }
method intersects ( Span::Int $span ) returns bool {
- my $i_start = $.start < $span.start ?? $span.start :: $.start;
- my $i_end = $.end > $span.end ?? $span.end :: $.end;
+ my $i_start = $.start < $span.start ?? $span.start !! $.start;
+ my $i_end = $.end > $span.end ?? $span.end !! $.end;
return $i_start <= $i_end;
}
@@ -43,16 +43,16 @@ method union ($self: Span::Int $span )
{
return ( $self, $span ) if $.end + $.density < $span.start;
return ( $span, $self ) if $span.end + $.density < $.start;
- my $i_start = $.start > $span.start ?? $span.start :: $.start;
- my $i_end = $.end < $span.end ?? $span.end :: $.end;
+ my $i_start = $.start > $span.start ?? $span.start !! $.start;
+ my $i_end = $.end < $span.end ?? $span.end !! $.end;
return $self.new( start => $i_start, end => $i_end, density => $.density );
}
method intersection ($self: $span ) {
return $span.intersection( $self )
if $span.isa( 'Span::Code' ) || $span.isa( 'Span::Num' );
- my $i_start = $.start < $span.start ?? $span.start :: $.start;
- my $i_end = $.end > $span.end ?? $span.end :: $.end;
+ my $i_start = $.start < $span.start ?? $span.start !! $.start;
+ my $i_end = $.end > $span.end ?? $span.end !! $.end;
return () if $i_start > $i_end;
return $self.new( start => $i_start, end => $i_end, density => $.density );
}
View
8 ext/Span/lib/Span/Num.pm
@@ -111,7 +111,7 @@ method union ($self: Span::Num $span )
}
elsif ($cmp == 0) {
$i_start = $.start;
- $open_start = $.start_is_open ?? $span.start_is_open :: 0;
+ $open_start = $.start_is_open ?? $span.start_is_open !! 0;
}
else {
$i_start = $.start;
@@ -125,7 +125,7 @@ method union ($self: Span::Num $span )
}
elsif ($cmp == 0) {
$i_end = $.end;
- $open_end = $.end_is_open ?? $span.end_is_open :: 0;
+ $open_end = $.end_is_open ?? $span.end_is_open !! 0;
}
else {
$i_end = $.end;
@@ -188,9 +188,9 @@ method stringify () returns String {
my $tmp1 = "$.start";
my $tmp2 = "$.end";
return $tmp1 if $tmp1 eq $tmp2;
- return ( $.start_is_open ?? '(' :: '[' ) ~
+ return ( $.start_is_open ?? '(' !! '[' ) ~
$tmp1 ~ ',' ~ $tmp2 ~
- ( $.end_is_open ?? ')' :: ']' );
+ ( $.end_is_open ?? ')' !! ']' );
}
method compare ( Span::Num $span ) returns int {
View
16 ext/Span/t/span-code.t
@@ -189,21 +189,21 @@ is( $odd_numbers.previous( 10 ), 9, 'odd even' );
{
# 0 .. Inf
my $span1 = Span::Code.new(
- closure_next => sub { $_ >= 0 ?? $_ + 1 :: 0 },
- closure_previous => sub { $_ > 0 ?? $_ - 1 :: -Inf },
- complement_next => sub { $_ < 1 ?? $_ + 1 :: Inf },
- complement_previous => sub { $_ < 0 ?? $_ - 1 :: -1 },
+ closure_next => sub { $_ >= 0 ?? $_ + 1 !! 0 },
+ closure_previous => sub { $_ > 0 ?? $_ - 1 !! -Inf },
+ complement_next => sub { $_ < 1 ?? $_ + 1 !! Inf },
+ complement_previous => sub { $_ < 0 ?? $_ - 1 !! -1 },
universe => $universe );
is( $span1.start, 0, "start" );
is( $span1.end , Inf, "end" );
# -Inf .. 10
my $span3 = Span::Code.new(
- closure_next => sub { $_ < 10 ?? $_ + 1 :: Inf },
- closure_previous => sub { $_ < 11 ?? $_ - 1 :: 10 },
- complement_next => sub { $_ >= 10 ?? $_ + 1 :: 11 },
- complement_previous => sub { $_ > 11 ?? $_ - 1 :: -Inf },
+ closure_next => sub { $_ < 10 ?? $_ + 1 !! Inf },
+ closure_previous => sub { $_ < 11 ?? $_ - 1 !! 10 },
+ complement_next => sub { $_ >= 10 ?? $_ + 1 !! 11 },
+ complement_previous => sub { $_ > 11 ?? $_ - 1 !! -Inf },
universe => $universe );
is( $span3.start, -Inf, "start" );
View
4 ext/Test-Builder/lib/Test/Builder/Test.pm
@@ -62,7 +62,7 @@ role Test::Builder::Test::Base
method report returns Str
{
- my $ok = $.passed ?? 'ok ' :: 'not ok ';
+ my $ok = $.passed ?? 'ok ' !! 'not ok ';
$ok ~= $.number;
$ok ~= " - $.description" if $.description;
@@ -109,7 +109,7 @@ class Test::Builder::Test::TODO does Test::Builder::Test::WithReason
{
method report returns Str
{
- my $ok = $.passed ?? 'ok' :: 'not ok';
+ my $ok = $.passed ?? 'ok' !! 'not ok';
my $description = "# TODO $.description";
return join( ' ', $ok, $.number, $description );
}
View
14 ext/Test/lib/Test.pm
@@ -113,7 +113,7 @@ sub cmp_ok (Str $got, Code &compare_func, Str $expected, Str ?$desc, +$todo, +$d
## isa_ok
sub isa_ok (Any|Junction|Pair $ref is rw, Str $expected_type, Str ?$desc, +$todo, +$depends) returns Bool is export {
- my $out := defined($desc) ?? $desc :: "The object is-a '$expected_type'";
+ my $out := defined($desc) ?? $desc !! "The object is-a '$expected_type'";
my $test := $ref.isa($expected_type);
Test::proclaim($test, $out, $todo, $ref.ref, $expected_type, $depends);
}
@@ -227,7 +227,7 @@ sub proclaim (Bool $cond, Str ?$desc is copy, ?$todo, Str ?$got, Str ?$expected,
$context = $todo;
}
else {
- $context = "TODO" ~ ($todo.isa('Str') ?? " $todo" :: '');
+ $context = "TODO" ~ ($todo.isa('Str') ?? " $todo" !! '');
if ( $cond ) {
$Test::num_of_tests_badpass ++;
}
@@ -238,10 +238,10 @@ sub proclaim (Bool $cond, Str ?$desc is copy, ?$todo, Str ?$got, Str ?$expected,
$context ~= " (depends on $depends working)";
}
- my $out = $desc.defined ?? " - $desc" :: "";
+ my $out = $desc.defined ?? " - $desc" !! "";
$out = "$out <pos:$?CALLER::CALLER::POSITION>" if $Test::ALWAYS_CALLER;
- my $context_out = $context.defined ?? " # $context" :: "";
+ my $context_out = $context.defined ?? " # $context" !! "";
print "not " unless $cond;
say "ok ", $Test::num_of_tests_run, $out, $context_out;
@@ -263,11 +263,11 @@ sub report_failure (Str ?$todo, Str ?$got, Str ?$expected) returns Bool {
# As PIL2JS doesn't support junctions yet, skip the junction part when
# running under PIL2JS.
if ($*OS eq "browser" or $?CALLER::CALLER::SUBNAME eq ('&Test::is' | '&Test::isnt' | '&Test::cmp_ok' | '&Test::eval_is' | '&Test::isa_ok' | '&Test::is_deeply' | '&Test::todo_is' | '&Test::todo_isnt' | '&Test::todo_cmp_ok' | '&Test::todo_eval_is' | '&Test::todo_isa_ok')) {
- Test::diag(" Expected: '" ~ ($expected.defined ?? $expected :: "undef") ~ "'");
- Test::diag(" Got: '" ~ ($got.defined ?? $got :: "undef") ~ "'");
+ Test::diag(" Expected: '" ~ ($expected.defined ?? $expected !! "undef") ~ "'");
+ Test::diag(" Got: '" ~ ($got.defined ?? $got !! "undef") ~ "'");
}
else {
- Test::diag(" Got: " ~ ($got.defined ?? $got :: "undef"));
+ Test::diag(" Got: " ~ ($got.defined ?? $got !! "undef"));
}
}
View
14 ext/Text-Glob/lib/Text/Glob.pm
@@ -30,23 +30,23 @@ method glob_to_regex ($glob) {
$regex ~= "\\$char";
}
elsif ( $char eq '*' ) {
- $regex ~= $escaping ?? "\\*" ::
- $.strict_wildcard_slash ?? "[^/]*" :: ".*";
+ $regex ~= $escaping ?? "\\*" !!
+ $.strict_wildcard_slash ?? "[^/]*" !! ".*";
}
elsif ( $char eq '?' ) {
- $regex ~= $escaping ?? "\\?" ::
- $.strict_wildcard_slash ?? "[^/]" :: ".";
+ $regex ~= $escaping ?? "\\?" !!
+ $.strict_wildcard_slash ?? "[^/]" !! ".";
}
elsif ( $char eq '{' ) {
- $regex ~= $escaping ?? '\{' :: '(';
+ $regex ~= $escaping ?? '\{' !! '(';
++$in_curlies unless $escaping;
}
elsif ( $char eq '}' && $in_curlies ) {
- $regex ~= $escaping ?? "}" :: ")";
+ $regex ~= $escaping ?? "}" !! ")";
--$in_curlies unless $escaping;
}
elsif ( $char eq ',' && $in_curlies ) {
- $regex ~= $escaping ?? "," :: "|"
+ $regex ~= $escaping ?? "," !! "|"
}
elsif ( $char eq "\\" ) {
if ($escaping) {
View
2 ext/Tree/lib/Tree.pm
@@ -40,7 +40,7 @@ method :_set_parent ($self: Tree $parent) returns Void {
## ----------------------------------------------------------------------------
## informational methods
-method is_root returns Bool { $:parent.defined ?? 0 :: 1 }
+method is_root returns Bool { $:parent.defined ?? 0 !! 1 }
method is_leaf returns Bool { +@:children == 0 }
method child_count returns Int { +@:children }
View
2 ext/URI/lib/URI/Escape.pm
@@ -16,7 +16,7 @@ module URI::Escape-0.6 {
multi sub uri_escape (Str $string is copy, Str $unsafe, Bool +$negate) returns Str is export(:DEFAULT) {
my $pattern;
- $pattern = ($negate) ?? "([^$unsafe])" :: "([$unsafe])";
+ $pattern = ($negate) ?? "([^$unsafe])" !! "([$unsafe])";
$string ~~ s:P5:g/$pattern/{ %escapes{$0} || fail_hi($0) }/;
View
2 ext/WTemplate/lib/WTemplate.pm
@@ -26,7 +26,7 @@ rule block {
## the main subs
sub run_widget($match_in, %variables) {
- my $match = $match_in<elem> ?? $match_in<elem> :: $match_in<block>;
+ my $match = $match_in<elem> ?? $match_in<elem> !! $match_in<block>;
my $widget = $match[0];
my %parameters;
%parameters{'_content'} = $match[3] if $match[3];
View
2 ext/libwww-perl/lib/HTTP/Cookies.pm
@@ -369,7 +369,7 @@ class HTTP::Cookies-0.0.1 {
given ($str) {
s:P5:g/%([0-9a-fA-F][0-9a-fA-F])/{
my $x = $0.uc;
- $x eq "2F"|"25" ?? "%$x" :: pack("C", hex($x));
+ $x eq "2F"|"25" ?? "%$x" !! pack("C", hex($x));
}/;
s:P5:g/([\0-\x20\x7f-\xff])/{ ord($0).as('%%%02X') }/;
}
View
8 ext/libwww-perl/lib/HTTP/Headers.pm
@@ -93,7 +93,7 @@ method remove_header (Str *@fields) {
for @fields -> $field is copy {
$field ~~ tr/_/-/ if not $field ~~ /^\:/ and $TRANSLATE_UNDERSCORE;
my $v = %:headers.delete($field.lc);
- push @values, $v ~~ Array ?? @$v :: $v if defined $v;
+ push @values, $v ~~ Array ?? @$v !! $v if defined $v;
}
return @values;
@@ -124,17 +124,17 @@ method :header (Str $field is copy, Str $val is copy, Str ?$op = "") {
my $h = %:headers{$field};
$h //= [];
- my @old = $h ~~ Array ?? @$h :: ($h);
+ my @old = $h ~~ Array ?? @$h !! ($h);
$val = undef if $op eq "INIT" and @old;
if $val.defined {
- my @new = ($op eq "PUSH") ?? @old :: ();
+ my @new = ($op eq "PUSH") ?? @old !! ();
if $val !~ Array {
push @new, $val;
} else {
push @new, *@$val;
}
- %:headers{$field} = @new > 1 ?? \@new :: @new[0];
+ %:headers{$field} = @new > 1 ?? \@new !! @new[0];
}
return @old;
View
4 ext/libwww-perl/lib/HTTP/Message.pm
@@ -152,7 +152,7 @@ method decoded_content ($self: ) {
method as_string ($self: Str ?$newline = "\n") returns Str {
my $content = $self.content;
- return [~] ($:headers.as_string($newline), $newline, ($content.chars && $content !~ /\n$/) ?? "\n" :: "");
+ return [~] ($:headers.as_string($newline), $newline, ($content.chars && $content !~ /\n$/) ?? "\n" !! "");
}
method parts ($self: *@new) is rw {
@@ -215,7 +215,7 @@ method :parts ($self: ) {
} elsif ($content_type eq "message/http") {
my $content = $self.content;
- my $class = ($content ~~ m,^(HTTP/.*)\n,) ?? HTTP::Response :: HTTP::Request;
+ my $class = ($content ~~ m,^(HTTP/.*)\n,) ?? HTTP::Response !! HTTP::Request;
@:parts = $class.parse($content);
} elsif ($content_type ~~ m,message/,) {
@:parts = HTTP::Message.parse($self.content);
View
2 ext/libwww-perl/lib/HTTP/Query.pm
@@ -19,7 +19,7 @@ class HTTP::Query-0.0.1 {
return unless @val > 0;
- return (want.List) ?? @val :: @val[0];
+ return (want.List) ?? @val !! @val[0];
}
multi method param ($query: Str $name, Str *@vals) is rw {
View
2 ext/libwww-perl/lib/HTTP/Request.pm
@@ -59,7 +59,7 @@ class HTTP::Request-0.1[?::URI_CLASS = URI] {
method as_string (Str ?$newline = "\n") {
my $req_line = $.method // "-";
- my $uri = (./uri().defined) ?? ./uri().as_string() :: "-";
+ my $uri = (./uri().defined) ?? ./uri().as_string() !! "-";
$req_line ~= $uri;
View
4 modules/Date/lib/Date/Gregorian.pod
@@ -64,10 +64,10 @@ Date::Gregorian - dates on the Gregorian Calendar
$new_date = $date.as_tz('Iceland');
# comparison between absolute dates
- say $date1 > $date2 ?? "I am older" :: "I am younger";
+ say $date1 > $date2 ?? "I am older" !! "I am younger";
# comparison between relative dates
- say $reldate1 > $reldate2 ?? "I am faster" :: "I am slower";
+ say $reldate1 > $reldate2 ?? "I am faster" !! "I am slower";
# Adding / Subtracting months and years are sometimes
# tricky; in general be sure whether you mean "one month"
View
6 modules/Date/t/01sanity.t
@@ -77,7 +77,7 @@ for @forms -> $form {
# rx:perl5/YY/ => { ( $year = r(100)).as("%02d") },
# rx:perl5/WNN/ => { ( $week = r(53)+1 ).as("W%02d") },
# rx:perl5/MM/ => { ( $month = r(12)+1 ).as("W%02d") },
- # rx:perl5/DDD/ => { ( $doy = r($year % 4 ?? 365 : 366)+1 )
+ # rx:perl5/DDD/ => { ( $doy = r($year % 4 ?? 365 !! 366)+1 )
# .as("W%03d") },
# rx:perl5/DD/ => { ( $month = r(31)+1 ).as("W%02d") },
# rx:perl5/D/ => { ( $wday = r(7)+1 ).as("W%01d") },
@@ -157,8 +157,8 @@ for @forms -> $form {
my $date = eval { date($iso) };
if ( $! ) {
fail("exception parsing ISO form $form (used: $iso)");
- skip (4 + ($doy ?? 1 :: 0) + ($week ?? 1 :: 0)
- + ( ($doy||$week) ?? 0 :: 2 )), "failed to parse";
+ skip (4 + ($doy ?? 1 !! 0) + ($week ?? 1 !! 0)
+ + ( ($doy||$week) ?? 0 !! 2 )), "failed to parse";
} else {
if ( $year > 100 ) {
is($date.year, $year, "$form - year");
View
6 modules/Grammars/MatchX.pm
@@ -42,7 +42,7 @@ class MatchX {
if !$m {
./set_as_failed;
} else {
- $.as_b = $m ?? bool::true :: bool::false;#?$m;
+ $.as_b = $m ?? bool::true !! bool::false;#?$m;
$.as_i = 0+$m;#+$m; #Should usually be 1.
$.as_s = ""~$m;#~$m;
$.as_a = [@$m];
@@ -82,7 +82,7 @@ class MatchX::Submatch is MatchX {
multi method MatchX::describe() returns String {
my $cls = .ref; $cls ~~ s:perl5/\A:://;
- my $b = $.as_b ?? 1 :: 0;
+ my $b = $.as_b ?? 1 !! 0;
my @ae = $.as_a;
my $a = join(",\n",map {$_.describe}, @ae);
if $a ne "" {
@@ -99,7 +99,7 @@ multi method MatchX::describe() returns String {
multi method Match::describe() returns String {
my $m = $?SELF;
my $cls = $m.ref; $cls ~~ s:perl5/\A:://;
- my $b = $m ?? 1 :: 0;
+ my $b = $m ?? 1 !! 0;
my $i = 0+$m;
my $s = ""~$m;
my $a = join(",\n",map {$_.describe},@$m);
View
4 modules/JavaScript-FrontEnd/ARuntime.pm
@@ -173,10 +173,10 @@ multi sub ToBoolean(JSX::Value::Undefined $v) { JSX::false }
multi sub ToBoolean(JSX::Value::Null $v) { JSX::false }
multi sub ToBoolean(JSX::Value::Boolean $v) { $v }
multi sub ToBoolean(JSX::Value::Number $v) {
- +$v == (+0|-0|NaN) ?? JSX::false :: JSX::true;
+ +$v == (+0|-0|NaN) ?? JSX::false !! JSX::true;
}
multi sub ToBoolean(JSX::Value::String $v) {
- ~$v eq "" ?? JSX::false :: JSX::true;
+ ~$v eq "" ?? JSX::false !! JSX::true;
}
multi sub ToBoolean(JSX::Value::Object $v) { JSX::true }
View
2 modules/Perl-MetaModel/docs/meta_meta_classes.pod
@@ -226,7 +226,7 @@ MetaMetaClass is actually independent of a given programming language. That it i
something which the "user" should ever really have access too. It is a part of the compiler
and/or runtime environment upon which a programming language resides.
-The second thing is ... hmmm, what was it??
+The second thing is ... hmmm, what was it?
=head1 Why do we need all this abstraction?
View
2 modules/Perl-MetaModel/lib/Array.pm
@@ -125,7 +125,7 @@ multi sub Array::pop () returns Scalar {
) returns List
multi sub Perl6::Lists::zip (: Array *@lists, Bit +$shortest) returns Lazy {
gather {
- while $shortest ?? all (@lists) :: any(@lists) {
+ while $shortest ?? all (@lists) !! any(@lists) {
for @lists -> @list {
take shift @list;
}

0 comments on commit 7f51c09

Please sign in to comment.