# alternative handling schematic (untested) use strict; use warnings; our $Inject = { # sort datatypes into groups tinytext => text, text => text, int => int, tinyint => int, etc. } our $Dispatch = { # define the dispatch code per group text => sub { my $self = shift; etc. }, int => sub { my $self = shift; etc. ), etc. } sub dispatch { # dispatch by unsorted datatype my $self = shift; $self -> { $Dispatch -> { $Inject -> { lc( $self -> { TYPE })}}}( @_ ); }