There's more than one way to do things | |
PerlMonks |
Simplified API for testing AnyEvent-related codeby Dallaylaen (Chaplain) |
on Sep 14, 2012 at 08:42 UTC ( [id://993681]=perlquestion: print w/replies, xml ) | Need Help?? |
Dallaylaen has asked for the wisdom of the Perl Monks concerning the following question:
When developing (and therefore writing tests and fire-and-forget scripts) for AnyEvent I routinely end up with a boilerplate like this:
I finally got fed up with it and wrote a module (after asking a local mailing list) with the following interface: So, my questions would be: 1) Is there such a module already? I haven't found one, but... 2) Is there really a need for such a module? 3) If so, how should I name it? I came up with AnyEvent::AdHoc, but that still isn't clear enough. AnyEvent::Test seems misleading (it's not test-only, and doesn't test AnyEvent itself) and AnyEvent::Simple/Easy seem too broad (besides, AnyEvent doesn't seem easy even with a nice wrapper). UPDATE: I released the code in question as AE::AdHoc. See http://search.cpan.org/~khedin/AE-AdHoc-0.08/lib/AE/AdHoc.pm
Back to
Seekers of Perl Wisdom
|
|