Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
First up, it is not a good idea to mix blocking code such as LWP::Simple with POE. And therein lies the rub with POE. Once you invite it into your code, forget everything else you know about writing Perl. Forget all those familiar modules that you've been using forever. Forget reading a file, or querying a directory, or asking the user a quick question, because unless there is a module in the POE::* namespace that does exactly what you want to do, and that module has been thoroughly tested and kept up to date with all the other POE::* modules you're gonna need, you're stuffed. Because once you go the 'build our own cooperative scheduler' route, everything--and that means everything--in your program has to be be broken up into small bite-sized chunks, and retain state across those chunks, so that the non-preemptive scheduler doesn't get locked out. It like using Lego. So long as everything you want to build has straight sides and is either a multiple of some fixed sized unit, or there is a (usually expensive) off-the-shelf part to suit, it's great. But if you want curved sides; or cirular holes; or 120° angles; or anything else that is vaguely custom--you're stuffed. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re^2: POE::Component::RSSAggregator breaks LWP::Simple::get
by BrowserUk
|
|