develooper Front page | perl.perl6.language | Postings from August 2001

Re: new syntax idea: eval "..."o;

Thread Previous
From:
Bart Lateur
Date:
August 7, 2001 14:15
Subject:
Re: new syntax idea: eval "..."o;
Message ID:
ijm0nto86fnvm88c4i28ap1q263r2uqh37@4ax.com
On Tue, 7 Aug 2001 09:27:43 -0400, John Porter wrote:

>David L. Nicol wrote:
>> 	eval ${code}o;
>
>Another brilliant idea from David Nicol!

Not really.

What I would like is an option to just *compile* a piece of perl code,
without executing it. This kinda works:

	$coderef = eval "sub { $code }";

and currently (5.6.0) even if $code contains sub definitions; but it's
still just a hack.

-- 
	Bart.

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