title: Perl's SQLite3: {NAME} not working?
body: <p>Here's a snippet of code from an sqlite database application I'm working on:</p>
  
  <pre><code>my $query = "select * from pins";
  my $sth = $dbh-&gt;prepare($query) or die "Couldn't prep: $DBI::errstr";
  $sth-&gt;execute or die "Exec problem: $DBI::errstr";
  my $result = $sth-&gt;fetchall_arrayref();
  my $names = $sth-&gt;{NAME} or die "Name failed: $DBI::errstr";
  foreach my $row (@$res) {
      # ... do some row-specific things
      foreach my $cell (@$row) {
          # ... do some cell-specific things
      }
  }
  </code></pre>
  
  <p>The query fires off just fine, and in fact it returns the correct results. However, for some reason, this line,</p>
  
  <pre><code>my $names = $sth-&gt;{NAME} or die "Name failed: $DBI::errstr";
  </code></pre>
  
  <p>Fails. {NAME} never returns the arrayref I'd expect. If I take the die clause out, it runs fine (throwing the expected "using uninitialized values" warning wherever I'm using $names, of course).</p>
  
  <p>Is there some obvious reason I'm missing that {NAME} wouldn't fire off, given that the query worked just fine?</p>
  
  <p>Thanks!</p>