# Currently:
has $!sth-ensure-item;
has $!sth-list-items;
method ensure-item
{
$!sth-ensure-item //= $!dbh.prepare(…);
$!sth-ensure-item.execute(…);
}
method list-items
{
$!sth-list-items //= $!dbh.prepare(…);
$!sth-list-items.execute(…);
}
# Preferred:
method ensure-item
{
something $sth := $!dbh.prepare(…);
$sth.execute(…);
}
method list-items
{
something $sth := $!dbh.prepare(…);
$sth.execute(…);
}