On 2002.01.13 22:25 Michael G Schwern wrote:
Why would this:
BEGIN {
push @INC, 'foo';
}
put 'foo' into @INC twice if it were compiled? The compiled program
should not be storing the post-BEGIN value of @INC, it should store
the original value at startup.
The
Michael G Schwern [EMAIL PROTECTED] writes:
On Sun, Jan 13, 2002 at 10:04:58PM +0100, Mattia Barbon wrote:
$ bleadperl -MO=-qq,Deparse foo.plx
sub BEGIN {
print foo\n;
}
print bar\n;
If B::Deparse can save BEGIN blocks, B::C can.
I didn't mean that I can't write code to
On Sun, Jan 13, 2002 at 10:04:58PM +0100, Mattia Barbon wrote:
$ bleadperl -MO=-qq,Deparse foo.plx
sub BEGIN {
print foo\n;
}
print bar\n;
If B::Deparse can save BEGIN blocks, B::C can.
I didn't mean that I can't write code to make B::C save BEGIN blocks
( it'd
On Mon, Jan 14, 2002 at 11:13:27AM +0100, Rafael Garcia-Suarez wrote:
On 2002.01.13 22:25 Michael G Schwern wrote:
Why would this:
BEGIN {
push @INC, 'foo';
}
put 'foo' into @INC twice if it were compiled? The compiled program
should not be storing the
Michael G Schwern [EMAIL PROTECTED] writes:
On Mon, Jan 14, 2002 at 10:23:46AM +, Piers Cawley wrote:
Um... You're wrong. If you do need 'startup time' initialization then
you should do it in an INIT block. If I may quote from the
documentation:
Like it or not, people put lots of init
On Mon, Jan 14, 2002 at 04:16:49PM +, Piers Cawley wrote:
Michael G Schwern [EMAIL PROTECTED] writes:
On Mon, Jan 14, 2002 at 10:23:46AM +, Piers Cawley wrote:
Um... You're wrong. If you do need 'startup time' initialization then
you should do it in an INIT block. If I may quote
On Mon, Jan 14, 2002 at 06:45:05PM +0100, Rafael Garcia-Suarez wrote:
# ~/tmp/Bar.pm
package Bar;
print \@INC as Bar sees it\n;
print join \n, @INC;
Nah. You should wrap this code in a CHECK block : otherwise, in
your example, it will be run at BEGIN-time (i.e. when the Bar module
On 2002.01.14 22:27 Michael G Schwern wrote:
B::Deparse has slowly gotten very good at figuring out BEGIN blocks
from 'use' statements and putting them in the right places. Hard
fought knowledge. Steal from it.
There are still problems with pragmas. (As I was working on B::Deparse
the last
Michael G Schwern [EMAIL PROTECTED] writes:
On Sun, Jan 13, 2002 at 10:04:58PM +0100, Mattia Barbon wrote:
$ bleadperl -MO=-qq,Deparse foo.plx
sub BEGIN {
print foo\n;
}
print bar\n;
If B::Deparse can save BEGIN blocks, B::C can.
I didn't mean that I can't write code to
On 2002.01.14 17:29 Michael G Schwern wrote:
On Mon, Jan 14, 2002 at 11:13:27AM +0100, Rafael Garcia-Suarez wrote:
On 2002.01.13 22:25 Michael G Schwern wrote:
Why would this:
BEGIN {
push @INC, 'foo';
}
put 'foo' into @INC twice if it were compiled? The
On Mon, Jan 14, 2002 at 04:16:49PM +, Piers Cawley wrote:
Like I said, if B::Deparse can do it, B::C can.
But it shouldn't. How do you distinguish between:
use Foo;
(needs to use 'Foo' before generating the compiled script, otherwise
what's the bloody point?)
and
On Mon, Jan 14, 2002 at 04:16:49PM +, Piers Cawley wrote:
Michael G Schwern [EMAIL PROTECTED] writes:
On Mon, Jan 14, 2002 at 10:23:46AM +, Piers Cawley wrote:
Um... You're wrong. If you do need 'startup time' initialization then
you should do it in an INIT block. If I may quote
On 2002.01.14 22:27 Michael G Schwern wrote:
B::Deparse has slowly gotten very good at figuring out BEGIN blocks
from 'use' statements and putting them in the right places. Hard
fought knowledge. Steal from it.
There are still problems with pragmas. (As I was working on B::Deparse
the last
On Mon, Jan 14, 2002 at 11:20:43PM +0100, Rafael Garcia-Suarez wrote:
On 2002.01.14 22:27 Michael G Schwern wrote:
B::Deparse has slowly gotten very good at figuring out BEGIN blocks
from 'use' statements and putting them in the right places. Hard
fought knowledge. Steal from it.
On Mon, Jan 14, 2002 at 10:38:36PM +, Piers Cawley wrote:
Deferring BEGIN blocks 'til runtime will break rather more realworld
program than it fixes I think.
Where is deferring involved?
Err... it goes like this:
compile phase, includes BEGIN blocks and any modules that get
On Mon, Jan 14, 2002 at 11:11:57PM +, Nicholas Clark wrote:
On Mon, Jan 14, 2002 at 10:38:36PM +, Piers Cawley wrote:
Michael G Schwern [EMAIL PROTECTED] writes:
On Mon, Jan 14, 2002 at 04:16:49PM +, Piers Cawley wrote:
Michael G Schwern [EMAIL PROTECTED] writes:
Michael G Schwern [EMAIL PROTECTED] writes:
If there's Perl-C translation issue as to why that's not possible,
ok. But I know from a B standpoint all the information is there to
handle BEGIN blocks.
No, it isn't.
--
Piers
It is a truth universally acknowledged that a language in
On Mon, Jan 14, 2002 at 11:43:24PM +, Piers Cawley wrote:
What's left?
What about begin blocks with side effects. How do you propose
detecting the side effects. How do you deal with things that may
dispatch to different subroutines depending on when they are
evaluated? How do you deal
18 matches
Mail list logo