On Mon Jun 15 05:40:54 2009, rehsack@web.de wrote:
Show quoted text> > What exactly was wrong with the interactive feedback:
> >
> > - prompt("Press return to continue...");
>
> Packaging often runs non-interactive. pkgsrc has the philosophy that all
> switches for the packages has to be made in mk.conf - I can't fight
against
Show quoted text> the packaging system here.
But prompt only prompts if Makefile.PL is running interactively - see
prompt in ExtUtils::MakeMaker:
If "prompt()" detects that it is not running interactively and there is
nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable is
set to true, the $default will be used without prompting. This prevents
automated processes from blocking on user input.
This all works fine for all those people doing DPAN::Reporter::Smoker
etc. prompt is the recognised way of doing this.
Show quoted text> > and what do you mean by "a dry test" like DBD::Sybase?
>
> No - DBD::Sybase doesn't provide a dry test, but the provide a
Getopt::Long
Show quoted text> featured list of switches which allow to answer all "prompt" requests
by the
Show quoted text> packager.
There are no prompt requests in DBD::ODBC only calls to prompt to make
sure you've read important information (see above).
I thought DBD::ODBC already had switches for the rest (NONE of which are
prompted for):
-o to set ODBCHOME
-u for unicode/non unicode
-g for debug
Show quoted text> A "dry test" is another feature - as packager I usually don't want to
> install a full ODBC environment including configuring test databases etc.
> for a "make test" run. But other native interfaces (e.g. DBD::Oracle etc.)
> doesn't support tests without databases, too. So maybe forget the "dry
test"
Show quoted text> idea :)
The dry test works with DBD::ODBC if you don't define DBI_DSN. Look at
the hundreds of cpan smoker test results for DBD::ODBC. These all a) run
non-interactively but the prompt knows this and b) all succeed but don't
actually run any database tests.
Show quoted text>
> > Why did you move unixodbc after iODBC:
> >
> > - $myodbc = 'unixodbc'
> > - if !$myodbc && glob "$odbchome/lib/libodbc.*";
> > -
> > $myodbc = 'iodbc'
> > if !$myodbc && ((glob "$odbchome/*iodbc*") ||
> > (glob "$odbchome/lib/*iodbc*"));
> >
> > + $myodbc = 'unixodbc'
> > + if !$myodbc && glob "$odbchome/lib/libodbc.*";
> > +
> > $myodbc = 'empress'
> > if !$myodbc && glob "$odbchome/lib/libempodbc.*";
>
> iodbc provides a libodbc.${shlibext}, too. So unixodbc detection will
> succeed there, even if iodbc is installed.
So if I do this it will work nicely for iODBC (a minority of users) but
it will break unixODBC (the majority of users). I think a different
solution is in order.
Martin
--
Martin J. Evans
Wetherby, UK