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

[PATCH] sort plays nethack in a scalar context (was: sort in scalarcontext, but broken due to inexperience.)

From:
Paul Fenwick
Date:
June 23, 2004 20:54
Subject:
[PATCH] sort plays nethack in a scalar context (was: sort in scalarcontext, but broken due to inexperience.)
Message ID:
40DA505A.2050500@perltraining.com.au
Randal L. Schwartz wrote:

> The other strawman I use is "sort in a scalar context might just
> play Nethack".  Can you implement that instead?

A patch is attached.  It's incompatible with David's 'sortedness' patch, 
and fails if nethack is not in the user's path.

Configure should be expanded to detect rogue-like games that are 
available on the system, so that an appropriate one can be started if 
nethack is not installed.

My original goal was for sort to play nethack when called in a void 
context, however it appears that Perl is smart enough to optimise this 
instance away.

Cheers,

	Paul

-- 
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681




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