http://www.perlmonks.org?node_id=624357


in reply to Re^3: A brief survey of the DBI usability layer modules on the CPAN
in thread A brief survey of the DBI usability layer modules on the CPAN

I strongly believe that this should not be fixed in the numerous modules that happen to be compatible with Template Toolkit, but in Template Toolkit itself.

In theory you are right. In practice, TT3 is a longer time coming than Perl 6.

Do you think that this would solve your problem?

As written, your suggested solution requires a decision at DBIS handle construction time whether the resultset methods should be context-sensitive or scalar-context-only. Thatís quite simply not possible for me: all of the database queries are in isolated in a class which creates a single DBIS handle at instatiation time.

But make it

$stash->{ $method . '_ref' } = sub { scalar shift->$supermethod( @ +_ ) };

and itís all good. (Modulo naming scheme anyway.)

(PS.: having list in the list of covered methods is pretty pointless.)

Makeshifts last the longest.