in reply to reuse worth it for small items?
It is certainly possible to golf this down, and it is an interesting exercise, but in practice it's unlikely to make the code more legible or reusable, so for production purposes I would not recommend it.
As far as how to golf it down, my first thought would be to reach for map update: like the following...
map{$Data->Sql("SELECT * FROM $_"); while($x=$Data->fetchrow_hashref){ $ConfigData{$$x{ID}}{$$x{DataName}}=$$x{DataValue}}; }qw(ConfigData DicomDestinations);
I'm sure someone can shave some more strokes off that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: reuse worth it for small items?
by revdiablo (Prior) on May 05, 2006 at 22:10 UTC |