Paul Johnson wrote:
I'm not particularly concerned about this one way or another. Provided the documentation is there people can look at the source or not as they please. No doubt some poeple would prefer the minimal AUTOLOAD code and others the more explicit longhand. Since it is machine generated we are keeping DRY whichever way we go.
Good point. It's also worth noting that the current Test::WWW::Selenium stuff actually uses AUTOLOAD in two places, and a natural choice might be to split the difference. Right now, the code uses AUTOLOAD to run arbitrary commands on the Selenium Server (so it doesn't have to define commands like "click" "open", etc. explicitly), and it also uses AUTOLOAD around those commands to define testing modifiers like _ok, _like, _is, _contains, etc.
IMO, generating the modifiers is considerably less confusing than generating *all* of the commands from the bottom up; it might be a good idea to leave in the AUTOLOAD stuff for the testing modifiers but literally define "click", "open" etc. in the code (automatically by code generation).
Re: CPAN...
I don't see a problem with that sort of thing going on CPAN, at least not from that point of view, but I do wonder if it is worthwhile given that it will exist as part of Selenium itself. I suppose the advantage would be that it would be possible to use standard perl installation mantras to install Selenium.
I'd think it'd be worth putting up on CPAN in some form, I think, if it could be done cleanly, for that reason alone.
But the idea of CPAN is that you should be able to just go to CPAN and -install your module and then, after a short wait, you should be ready to begin using it. When the module has dependencies on other non-Perl non-C code, that presumably means you're going to have to install another interpreter as well.
I could certainly imagine a CPAN module that would automatically install Java (Alien::Java?), but that seems Really Weird to me, perhaps especially because Java isn't Free-as-in-Speech software. I'd sooner imagine someone writing an Alien::Python CPAN module or an Alien::Ruby module!
What is the state of this at the moment? I need it now, otherwise I'll be using the Ruby driver ;-)
Well, if you need it Now (tm) then you *should* use the Ruby driver. :-)
I have some time to work on it at the moment, but I might not have in a few days. Luke mentioned he had the basics of something, and you have volunteered here. Is there something I can assist with?
Not really. Writing an RC-compatible thin Perl driver is a matter of a day; I've done it, and it sounds like Luke's got one, and some other folks have also written one. I think the only thing to do now is decide what to do with all this code we've written.
-Dan