Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove * from bless
  • Loading branch information
moritz committed Sep 24, 2013
1 parent 1b5b120 commit b3c7bd2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions lib/Mu.pod
Expand Up @@ -74,18 +74,13 @@ Classes may provide their own C<new> method to override this default.
=head2 bless
method bless(Mu $candidate, *%attrinit) returns Mu:D
method bless(*%attrinit) returns Mu:D
Lower-level object construction method than C<new>.
If you pass a C<Whatever> as a candidate, it creates a new object
of the same type as the invocant, and then uses the named arguments
to initialize attributes.
If you pass something other than a C<Whatever> object as a candidate,
it simply does the attribute initialization on the C<$candidate>.
In both cases, the object with the attributes initialized is returned.
Creates a new object of the same type as the invocant, uses
the named arguments to initialize attributes, and returns the
created object.
You can use this method when writing custom constructors:
Expand Down
2 changes: 1 addition & 1 deletion lib/Perl6/TypeGraph.pm
Expand Up @@ -26,7 +26,7 @@ class Perl6::TypeGraph {
}

method new-from-file($fn) {
my $n = self.bless(*);
my $n = self.bless;
$n.parse-from-file($fn);
$n;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Perl6/TypeGraph/Viz.pm
Expand Up @@ -12,7 +12,7 @@ class Perl6::TypeGraph::Viz {
has $.node-hard-limit = 50;

method new-for-type ($type) {
my $self = self.bless(*, :types([$type]));
my $self = self.bless(:types([$type]));
$self!add-neighbors;
return $self;
}
Expand Down

0 comments on commit b3c7bd2

Please sign in to comment.