>>>>> On Sun, 4 Feb 2007 21:13:04 -0600, Ken Williams <[EMAIL PROTECTED]> said:

  > I think I've got a reasonable fix, does it look reasonable to you?

While it seems to solve my problem, I got a recommendation from Slaven
Rezic to look at perlfaq8 "How do I find out if I'm running
interactively or not?" and what he made out of it in Tk::Pod::Util

sub is_interactive {
    if ($^O eq 'MSWin32' || !eval { require POSIX; 1 }) {
        # fallback
        return -t STDIN && -t STDOUT;
    }

    # from perlfaq8
    open(TTY, "/dev/tty") or die $!;
    my $tpgrp = POSIX::tcgetpgrp(fileno(*TTY));
    my $pgrp = getpgrp();
    if ($tpgrp == $pgrp) {
        1;
    } else {
        0;
    }
}


Of course, this has a different focus on an X11 application, but when
Module::Build is run from an X11 app, it might be relevant.

-- 
andreas

Reply via email to