develooper Front page | perl.module-authors | Postings from May 2011

Re: Proposal: IO::Termios

Thread Previous
From:
Paul LeoNerd Evans
Date:
May 25, 2011 03:50
Subject:
Re: Proposal: IO::Termios
Message ID:
20110525105009.GF32367@cel.leo
On Tue, May 24, 2011 at 12:57:20PM -0700, Austin Schutz wrote:
> 
> IO::Tty. IO::Stty.

IO::Tty is useful and contains constants and so on, but it isn't an
IO::Handle subclass. Can be quite cute.

IO::Stty is also not an IO::Handle subclass, and has a somewhat odd
interface.

> I don't see what this really adds above and beyond the core POSIX
> module and those two, but if you really like your "combined" syntax
> I guess that's something.

It's a small subclass around IO::Handle, that adds useful methods to
handle objects themselves.

It's similar to what IO::Socket and friends adds to IO::Handle from
Socket. I'm doing the same for TTYs...

> >    use IO::Termios -upgrade;
> >
> >    STDIN->setflag_echo( 0 );
> >    my $password = <STDIN>;
> >    STDIN->setflag_echo( 1 );

Such as this.

Sure you -can- do that with the other modules, but this makes it much
more convenient.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About