develooper Front page | perl.beginners | Postings from December 2002

RE: SetReadMode doc (guru needed, unresolved)

From:
wiggins
Date:
December 9, 2002 06:14
Subject:
RE: SetReadMode doc (guru needed, unresolved)
Message ID:
200212091414.IAA27599@crows.siteprotect.com
This is where things get a little fuzzy for me :-)...sorry about that. If my understanding is correct, I believe it is an autoloaded method, in other words it is not directly defined anywhere in the module, it is automagically defined by Perl.  It also appears to be autoloaded from a c function, possibly in a tty library, but this is all rather unclear to me.  Obviously it sets the mode on the filehandle, which I believe is the tty where the script is running, but now we have gotten way beyond my expertise. (Updated the subject so hopefully someone else with more knowledge will pop in and read this one).

http://danconia.org


------------------------------------------------
On Mon, 9 Dec 2002 07:21:10 -0500 , Rob Das <Rob.Das@MEDecision.com> wrote:

> This is the code from subroutine ReadMode:
> 
> sub ReadMode {
> 	my($mode) = $modes{$_[0]};
> 	my($fh) = normalizehandle((@_>1?$_[1]:\*STDIN));
> 	if(defined($mode))
> 		{ SetReadMode($mode,$fh) } 
> 	elsif( $_[0] =~ /^\d/)
> 		{ SetReadMode($_[0],$fh) }
> 	else
> 		{ croak("Unknown terminal mode `$_[0]'"); }
> }
> 
> What does "SetReadMode($mode,$fh)" do?
> 
> Thanks
> 
> -----Original Message-----
> From: Wiggins d'Anconia [mailto:wiggins@danconia.org]
> Sent: Saturday, December 07, 2002 8:47 AM
> To: Rob Das
> Cc: beginners@perl.org
> Subject: Re: SetReadMode doc
> 
> 
> I do not see a "SetReadMode" I see a "ReadMode"....
> 
> http://search.cpan.org/author/JSTOWE/TermReadKey-2.21/ReadKey.pm
> 
> http://danconia.org
> 
> Rob Das wrote:
> > Hi All:
> > 
> > I'm trying to find documentation on SetReadMode. It's in CPAN module
> > "Term::ReadKey", which I can't persuade to work with Perl2exe (for NT AND
> > Solaris AND HP-UX), so I'd like to pick out the bits of code I need and
> put
> > them in my own script. First, I'd like to understand what SetReadMode is
> all
> > about. Please point me in the right direction if possible.
> > 
> > Thanks
> > 
> > Rob
> > 
> > 
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> 



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