Skip to content

Commit

Permalink
Early versions of Pair.perl and Pair.Str.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Dec 5, 2009
1 parent 53a6f77 commit 17a1ec1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/core/Pair.pm
Expand Up @@ -2,4 +2,17 @@ augment class Pair {
method value() {
$!value
}

multi method perl() {
# $.key.perl ~ ' => ' ~ $.value.perl;
"Pair.new(:key({$.key.perl}), :value({$.value.perl}))";
}

# I don't see anything in the spec about what
# this should do. This is doing the same thing
# that ~Pair did in old Rakudo master, which didn't
# seem to have Pair.Str.
multi method Str() {
"$.key\t$.value";
}
}

0 comments on commit 17a1ec1

Please sign in to comment.