Skip to content

Commit

Permalink
Move Parcel.hash out of PIR and into core setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed May 28, 2011
1 parent 2ad1b52 commit 64178b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/builtins/Parcel.pir
Expand Up @@ -48,16 +48,6 @@ A Parcel in item context becomes a Seq.
.end


=item hash()

=cut

.sub 'hash' :method
x_enter_sublog
.tailcall '&hash'(self)
.end


=item iterator()

Construct an iterator for the Parcel.
Expand Down
7 changes: 7 additions & 0 deletions src/core/Parcel.pm
@@ -1,4 +1,7 @@
augment class Parcel does Positional {
# methods defined in src/builtins/Parcel.pir:
# .item .iterator .perl .Bool .Capture !STORE

method Str() { self.flat.Str }

method elems() { self.flat.elems }
Expand All @@ -22,4 +25,8 @@ augment class Parcel does Positional {
?? !$x.defined || ($x ~~ Positional && $x == 0)
!! self.Seq.ACCEPTS($x)
}

multi method hash() {
my %h = self;
}
}

0 comments on commit 64178b4

Please sign in to comment.