note
Aristotle
<blockquote>
<p>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.</p>
</blockquote>
<p>In theory you are right. In practice, TT3 is a longer time coming than Perl 6.</p>
<blockquote>
<p>Do you think that this would solve your problem?</p>
</blockquote>
<p>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.</p>
<p>But make it</p>
<c>
$stash->{ $method . '_ref' } = sub { scalar shift->$supermethod( @_ ) };
</c>
<p>and it’s all good. (Modulo naming scheme anyway.)</p>
<p>(PS.: having <code>list</code> in the list of covered methods is pretty pointless.)</p>
<p align="right" class="pmsig pmsig-114691"><i>Makeshifts last the longest.</i></p>
504724
622771