On Fri, May 13, 2005 at 04:21:25PM +0200, "TSa (Thomas Sandlaß)" wrote:
: And I hope that it is not possible to accidentially
: mess up the internals of the compiler because code
: in a BEGIN hits compiler data.
Whereas I hope that it *is* possible to intentionally
mess up the internals of the com
Benjamin Smith wrote:
sub foo { my $x; BEGIN { $x = 3 }; say $x }
foo; foo; foo;
Currently in perl5 and pugs this prints "3\n\n\n".
Which to me looks like a mix of runtime and compile time.
Actually Dave Mitchell confirmed that this is the case in
Perl 5. I have difficulty to regard this as a f
On Thu, May 12, 2005 at 09:06:48PM +0100, Benjamin Smith wrote:
> sub foo { my $x; BEGIN { $x = 3 }; say $x }
> foo; foo; foo;
>
> Currently in perl5 and pugs this prints "3\n\n\n".
>
> Should BEGIN blocks be able to modify values in lexical variables that
> don't really exist yet? (People ca
sub foo { my $x; BEGIN { $x = 3 }; say $x }
foo; foo; foo;
Currently in perl5 and pugs this prints "3\n\n\n".
Should BEGIN blocks be able to modify values in lexical variables that
don't really exist yet? (People can use state after all to get a
variable which does exist early enough for them