>>>>> "P" == Paul <ydbxmhc@yahoo.com> writes: >> Next, you don't want . at all, unless you want to try single >> dispatch first and then fall back on multimethod dispatch. You >> typically call a multimethod as if it were a sub: >> >> foo($o, 1); # calls version 1 >> foo($o, qw/ this calls version 2 /); >> foo($o, $x,@y); # calls version 3 P> Huh? Why? And could you elaborate "try single dispatch first and then P> fall back on multimethod dispatch"? Suddenly I feel stupid again. :) well, if there is a plain sub foo declared in scope (or whatever) it will be called regardless of any multi foo declarations. if none is found then a search for multi foo's will be done and multidispatch will pick the 'best' one to call. as for feeling stupid again, it is all part of the p6 game and we are all players. :) P> Probably Scalar rather that Str, yes? P> Speaking of which, can we typecast? P> my @a = String qw/ 1 2 3 / ; P> Looks bogus to me, but the effect could come in handy. Maybe P> my String @a = 1..3; P> is better? i think that should be: my @a of Str = 1..3; maybe that is just a synonym for your version. i am still (in)digesting A6/S6. :) @a is not a Str but its elements are. uri -- Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.orgThread Previous | Thread Next