Compiled programs to keep BEGIN blocks? (was Re: [RFC] Switch to make Test::Builder output even if $^C ( for B::C ))

2002-01-13 Thread Michael G Schwern
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 >

Re: [RFC] Switch to make Test::Builder output even if $^C ( for B::C )

2002-01-13 Thread Mattia Barbon
> On Sun, Jan 13, 2002 at 07:39:52PM +0100, Mattia Barbon wrote: > > > perlcc seems to be dropping BEGIN blocks entirely, that's the problem. > > > > No, that's correct. Explanation: if I have a module Foo > > > > package Foo; > > > > $x = 1; > > print "AAA"; > > > > sub a { $x } > > > > 1

Re: [RFC] Switch to make Test::Builder output even if $^C ( for B::C )

2002-01-13 Thread Michael G Schwern
On Sun, Jan 13, 2002 at 07:39:52PM +0100, Mattia Barbon wrote: > > perlcc seems to be dropping BEGIN blocks entirely, that's the problem. > > No, that's correct. Explanation: if I have a module Foo > > package Foo; > > $x = 1; > print "AAA"; > > sub a { $x } > > 1; > > and a main prog

Re: [RFC] Switch to make Test::Builder output even if $^C ( for B::C )

2002-01-13 Thread Mattia Barbon
Now I understand I missed to tell you this fundamental detail before, sorry. > perlcc seems to be dropping BEGIN blocks entirely, that's the problem. No, that's correct. Explanation: if I have a module Foo package Foo; $x = 1; print "AAA"; sub a { $x } 1; and a main program foo.pl --