I was looking for a make-myself-useful-and-learn-something project on
the cgiapp wiki and came across a call for a Mechanize'd tester for
cgiapp.
I put this together after looking at how the catalyst equivalent
works. I'd appreciate any feedback folks care to throw at it.
It has the following issues that I'd like to straighten out:
o it has a poorly named method, "instance", which can contain either
the name of a class (CGI::Application or
CGI::Application::Dispatch derived) or a CODE ref that the
mechanic uses to handle the request.
I thought about "handler", but that's pretty thoroughly overloaded
in our world. "request_handler"???
Anyway, I'd appreciate suggestions.
o If you use CAP::AutoRunmode, you need to let the mechanic know so
that it can also 'use' it, otherwise things Just Don't Work. The
way things are right now it's probably a dependency. I'll at
least need to eval the use statement, but I might be able to do
something better. Require/import on demand doesn't work, I think
because AutoRunmode does its magic at compile time.
o The code'll get a little more cleanup, and the docs will get
fluffed up a bit.
It'll do the right thing with packages that inherit from
CGI::Application (new up an instance and call ->run()) and
CGI::Application::Dispatch (call the class method ->dispatch()). You
can also give it your own sub to call if you'd like to do something
different.
Without further ado:
http://shrimp.alerce.com/cgiapp/Test-WWW-Mechanize-CGIApp-0.03.tar.gz
What do you think?
Thanks,
g.
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.