in reply to RE: (2) (Package Data) RE: (3) You can't get there from here....
in thread References of Eternal Peril

The only other idea I have uses a list reference and a hash slice with bind_columns. I haven't tested this with DBI, but I did test it standalone.
#!/usr/bin/perl -w use strict; my %h; my @cols = qw( one two three four ); @h{@cols} = ( 1 .. 4 ); assign( \( @h{ @cols } ) ); print "$_ => $h{$_}\n" foreach @cols; sub assign { my $val = 0; foreach (@_) { $$_ = $val++; } }
There. You name your variables only once (outside of the template section), bind them to columns for speed, and are able to access them via a hash lookup. No symbolic references, and the only ugly construct is making a list of references from a hash slice. That beats the map stuff in my book, and it looks like a spaceship. You can't go wrong there.
  • Comment on RE: RE: (2) (Package Data) RE: (3) You can't get there from here....
  • Download Code