Thanks for your help corion
I am using SOAP::Lite to make calls to vendor api's which is internally using LWP.
I tried to override that but maybe done something wrong, if use Coro::LWP will it over ride that behavior, i went looking into source of LWP and it requires LWP::Useragent and stuff.
Your other suggestion, if i understand correctly is to fetch data store it in DB or files and read from there to serve as json.
The example that i gave of product data.
Basically this script is used to search inventory based on user search and results must be fetched from api's directly every time by my script add some of our data and return to user.
As this is inventory like that of airline seats,hotel rooms etc which is frequently changing. I cannot make cache of this information (cache misses are higher than cache hits used CHI driver BerkeleyDB) further the search combinations could be huge to fetch and write to data.
Biggest problem is main threads must wait till all threads return data, hence cannot use detach, detached thread writes data to file/db, main thread polls for write etc.
Any other approach i can follow?