develooper Front page | perl.module-authors | Postings from October 2005

Re: Tests needing user parameters

Thread Previous | Thread Next
A. Pagaltzis
October 20, 2005 02:44
Re: Tests needing user parameters
Message ID:
* David Landgren <> [2005-10-20 10:30]:
> Jess Robinson wrote:
> >Right, I'd seen a few modules do this, but.. Is there a
> >*standard* way of doing it? Those Makefile.PLs tend to look
> >cluttered and confusing IMO.. a nice:
> >
> >use Test::Auth; 
> >get_user_fields("user", "password");
> >
> >would be preferable.. (hmmm, could write something that does
> >that, using IO::Prompt.. anyone interested?)
> If there's a standard way of doing it, it would be really nice
> that it understood when it was being run in a smoke
> environment, and asked no questions and used built-in defaults.

That’s exactly what EU::MM’s prompt() function and
Module::Build’s prompt() method do/are for.

*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About