Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add P5Str to Bool
  • Loading branch information
FROGGS committed May 21, 2013
1 parent 19ecc83 commit 01aa6d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Perl5/Terms.pm
Expand Up @@ -105,6 +105,11 @@ augment class Any {
}
}

augment class Bool {
multi method P5Str(Bool:U:) { '' }
multi method P5Str(Bool:D:) { ?self ?? 1 !! '' }
}

augment class Array {
multi method P5Str(Array:U:) { '' }
multi method P5Str(Array:D:) { join '', map { $_ ?? $_.P5Str !! '' }, @(self) }
Expand Down

0 comments on commit 01aa6d2

Please sign in to comment.