develooper Front page | perl.perl5.porters | Postings from June 2004

RE: [PATCH] sort plays nethack in a scalar context

Thread Next
From:
Orton, Yves
Date:
June 25, 2004 03:03
Subject:
RE: [PATCH] sort plays nethack in a scalar context
Message ID:
E471ED2DFD9353458E8B75FD6D6B03071ADE58@defra1ex4.wcom.de
> On Fri 25 Jun 2004 11:27, Nicholas Clark <nick@ccl4.org> wrote:
> > On Fri, Jun 25, 2004 at 04:29:04PM +1000, Paul Fenwick wrote:
> > 
> > >      if (gimme != G_ARRAY) {
> > > +	if (PerlLIO_isatty(PerlIO_fileno(PerlIO_stdin())) &&
> > > +	    PerlLIO_isatty(PerlIO_fileno(PerlIO_stdout()))) {
> > > +		system(ROGUELIKE_GAME);
> > 
> > You're not checking the return code from system.
> > In scalar context shouldn't the return value be some sort 
> of score for 
> > this game of nethack?
> 
> And if Configure should define ROGUELIKE_GAME, what will 
> happen if the binary is used on another system that doesn't 
> have that game?
> 
> So, if this option is enabled, it should do a runtime check 
> on games enabled.

Also I think that you need to consider that nethack will rarely be present
on Win32. I suggest launching minesweeper instead on that OS. (winmine.exe)
What should the Mac port launch though? (And actually wont the terminal
tests cause problems there?)  Maybe you guys need to rethink this all with
portability in mind.

Yves

Thread Next


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