rhesa's option about subrefs is a good one. However, someone people may squick at the
no strict 'refs'; component. The following is strictures-compliant:
my $obj = Some::Class->new( @args );
my $method = "sub_${x}_text_${y}";
my $rv = $obj->$method( @params );
Yes, this is considered a feature.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?