@commands = ( sub { $_[0]->add_node('W1') }, sub { $_[0]->add_node('W2') }, sub { $_[0]->add_edge( W2 => 'W1' ) }, ); use GraphViz; my $g = GraphViz->new(); foreach my $command (@commands) { $command->($g); }
In reply to Re: calling methods using a variable (FORMATTED)
by chromatic
in thread calling methods using a variable (FORMATTED)
by dpippen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |