[EMAIL PROTECTED] wrote:
Ok. If you'd really need such random dispatch, it could be done like this, when I interpret A12 correctly:
sub run_random_bar($x) { my @meths = WALKMETH($x, :method('bar')); my $meth = @meths[rand(@meths.elems)]; $meth($x); }
or even with
my sub bar($x) {...} # same body as above
bar($x);
This is enough to make me completely happy. :)
Miro