in reply to Re: storing and using LoL path
in thread storing and using LoL path
i.e. in my concentrate case I was looping over a result of SOAP::Lite. Which depending on the type of the object places the 'price' in different places f.e.my %map = ( typeA => sub { $_[0]->{key1}[3]{key2} }, typeB => sub { $_[0]->{key3} }, typeC => sub { $_[0]->[1]{key4} }, # ... );
So instead of doing alot of if-typeX, I thought it will be good if I can store the access-path in some way and do a simple hash lookup.$$obj{cost} <--type1 $$obj{priceList}{price} <--type2 $$obj{priceList}{price}{value} <--type3 ...etc..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: storing and using LoL path
by almut (Canon) on May 26, 2007 at 02:03 UTC |