Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move Pair.key back out of the Setting. Rationale: we use Pair.key whe…
…n doing is export, and thus end up calling a Perl 6 sub before it's had chance to be re-blessed, which is about to become a bad thing. Happily, I think this is all that will need moving.
  • Loading branch information
jnthn committed Apr 4, 2009
1 parent aee2e3b commit c6301b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 11 additions & 0 deletions src/classes/Pair.pir
Expand Up @@ -20,6 +20,17 @@ src/classes/Pair.pir - methods for the Pair class
.end


=item key

Gets the key of the pair.

=cut
.sub 'key' :method
$P0 = getattribute self, '$!key'
.return ($P0)
.end


=item get_string() (vtable method)

Stringify the Pair.
Expand Down
9 changes: 0 additions & 9 deletions src/setting/Pair.pm
Expand Up @@ -23,15 +23,6 @@ the key and value.
return sprintf($format, $.key, $.value);
}

=begin item key
Gets the key of the pair.
=end item
method key() {
return $!key;
}

=begin item kv
Return key and value as a 2-element List.
Expand Down

0 comments on commit c6301b7

Please sign in to comment.