Navigation Menu

Skip to content

Commit

Permalink
Use $.key rather than self.key etc in Pair.pm; improvement suggested …
Browse files Browse the repository at this point in the history
…by moritz++.
  • Loading branch information
jnthn committed Feb 24, 2009
1 parent e074bf4 commit 70d9081
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/setting/Pair.pm
Expand Up @@ -7,8 +7,8 @@ Delegates on to a method call '.:Xkey(Xval)'.
=end item
method ACCEPTS($topic) {
my $meth_name = ':' ~ self.key;
return $topic."$meth_name"(self.value);
my $meth_name = ':' ~ $.key;
return $topic."$meth_name"($.value);
}

=begin item fmt
Expand All @@ -20,7 +20,7 @@ the key and value.
=end item
method fmt(Str $format) {
return sprintf($format, self.key, self.value);
return sprintf($format, $.key, $.value);
}

=begin item key
Expand All @@ -38,7 +38,7 @@ Return key and value as a 2-element List.
=end item
method kv() {
return list(self.key, self.value);
return list($.key, $.value);
}

=begin item pairs
Expand All @@ -63,7 +63,7 @@ Returns a Perl code representation of the pair.
=end item
method perl() {
return self.key.perl ~ ' => ' ~ self.value.perl;
return $.key.perl ~ ' => ' ~ $.value.perl;
}

}
Expand Down

0 comments on commit 70d9081

Please sign in to comment.