Skip to content

Commit

Permalink
get rid of undef in the setting
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Nov 25, 2009
1 parent 2fc0a98 commit f151334
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/setting/Any-num.pm
Expand Up @@ -407,9 +407,8 @@ multi sub sqrt(Any $x) {
$x.Num.sqrt
}

proto sign($x) { sign($x) }
multi sub sign(Any $x) {
defined($x) ?? $x.Num.sign !! undef;
proto sign($x) {
defined($x) ?? $x.Num.sign !! Bool;
}

multi sub roots($x, $n) {
Expand Down
4 changes: 2 additions & 2 deletions src/setting/Match.pm
Expand Up @@ -48,8 +48,8 @@ class Match is also {

method !_perl_quant($obj, $indent) {
my $sp = ' ' x $indent;
if $obj ~~ undef {
take 'undef';
if !defined($obj) {
take '()';
} elsif $obj ~~ Match {
take $obj!_perl($indent + 3);
} else {
Expand Down

0 comments on commit f151334

Please sign in to comment.