Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If you reverse their order, it's simply a closure:
Otherwise, you're looking for something like adding $datastructure to a prototype class with $dereferencer as a method, kinda quirky. Update: two syntactical clarifications. {foo} is wrong because Perl 6 has no barewords; use either {'foo'} or the shorthand above that exploits the list quote operator. $^moose is just a placeholder variable, a scalable extension of the hardcoded $a and $b of sort comparators. There are other ways to express this idea. Update II (more to the point): I said quirky, but of course I didn't mean impossible. If you're dead set on .<foo>[1]<bar><baz>[3] as a method you can sure compose $datastructure to a role that implements it. Unless I'm messing up the syntax (in which case I hope to be corrected):
In reply to Re: [Perl 6] Any provision for a "dereferencing object"?
by gaal
|
|