NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Cool! (Score:1)
Parameter traits (Score:1)
Hi!
Yes, I think people will be able to use this to build some pretty cool stuff, and I look forward to seeing that. :-)
Being able to attach some extra data would be done through parameter traits. I've got all of the pieces to do those, pretty much; just need to plug them together. But it'll look something like...
role note { has $.note }
multi trait_mod:<is>(Parameter $p, note, $message) {
$p does note($message);
}
After which you'll be able to write:
sub drink($beverage is