That breaks inheritance. You oughtn't assume anything about how Tool gets or implements new(). I suggest instead:
my %states = ( module => sub { Tool->new( @_ ) }, );
In reply to Re^2: howto reference to a external sub/object/constructor thingy
by chromatic
in thread howto reference to a external sub/object/constructor thingy
by arcnon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |