in reply to improov mein k0den

IO::Prompt

--

See the Copyright notice on my home node.

"The first rule of Perl club is you do not talk about Perl club." -- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: improov mein k0den
by jdporter (Paladin) on Mar 29, 2007 at 16:44 UTC

    Nice idea, but...

    Watch what happens on Windows*:

    C:\>perl 607274.pl Cannot write to terminal: No such file or directory at 607274.pl line +12

    A check of the IO::Prompt man page splains that this means

    your environment has no /dev/tty available, in which case there isn't much you can do with this module. Sorry.
    Diving into the module's source, we find that it is indeed rife with the following:
    open my $OUT, ">/dev/tty" or croak "Cannot write to terminal: $!";
    And yet, inexplicably (ironically?), the documentation's DEPENDENCIES, INCOMPATIBILITIES, and BUGS AND LIMITATIONS sections are coyly silent on this shameless OS bondage.

    Somehow this doesn't strike me as "perl best practices". Very disappointing.

    * Not just Windows, but any other OS which doesn't represent its terminal in the filesystem via a file named /dev/tty. Which is most of them.

    A word spoken in Mind will reach its own level, in the objective world, by its own weight
A reply falls below the community's threshold of quality. You may see it by logging in.