Skip to content

Commit

Permalink
Update classtut.pod
Browse files Browse the repository at this point in the history
Rakudo now appears to support at least enough autovivification to remove this line.

The program below does the right thing and the examples appear to work without the initialization.
perl6 -e 'my %h; push(%h<k>, "v"); %h.say'

That part of the code seems to date back to September 2012 or earlier.
  • Loading branch information
ronaldxs committed Jul 5, 2014
1 parent 3c80575 commit 9ab09e5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/Language/classtut.pod
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ significant improvement over Perl 5's approach to handling multiple inheritance.
=begin code
class GeekCook is Programmer is Cook {
method new( *%params ) {
%params<cookbooks> //= []; # remove once Rakudo fully supports autovivification
push( %params<cookbooks>, "Cooking for Geeks" );
return self.bless(|%params);
}
Expand Down

0 comments on commit 9ab09e5

Please sign in to comment.