in reply to Re^3: Writing automatic code from sql
in thread Writing automatic code from sql

Here's the code that works:

my %h; while(my $r = $st->fetchrow_hashref()) { my $mod = $r->{'Module'}; my $sub = $r->{'Subroutine'}; my $par = $r->{'Params'}; $h{$r->{'VarName'}} = sub { $mod->$sub(eval "$par"); }; }
You've got my +! Thanks again.

Replies are listed 'Best First'.
Re^5: Writing automatic code from sql
by Corion (Patriarch) on Oct 11, 2011 at 13:32 UTC

    This is basically what DBIx::VersionedSubs::Hash does, except it also allows you to dynamically load newer versions from the database.