On Tue, Jan 08, 2002 at 11:02:27PM +0100, Mattia Barbon wrote: > > Code inside the BEGIN blocks has $^C set?? Or are they just not being > > run at all? Either of those are bugs. But there's a third > > The code inside the begin blocks has $^C set ( as it should ), and they > are being run > ( as they should )
The code inside the BEGIN blocks has $^C set *only when compiling with perlcc* right? If you run the bytecompiled code the BEGIN blocks should not have $^C set. Lemme recompile things and try this out. > > If you were to take: > > > > BEGIN { print "foo" } > > > > compile it and run it, would you expect the output to be 'foo'? Or is > > the problem that you're getting 'foo' both during the compilation > > *and* when its run? As with this: > > I'd expect the output of the compiled program to be nothing _normally_ > ( perlcc foo.pl ), > and "foo" _if I used the --testsuite switch when calling perlcc_ > ( perlcc --testsuite foo.pl ). > > And in order to not have to introduce hacks in t/TEST, I'd like > that the compiled program resulting from > > use Test::Simple tests => 12; > > would print nothing normally, and 1..2 _if I passed the --testsuite > switch to perlcc_ . Now wait a second. Why would the compiled program print nothing normally? $^C should not be set. -- Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/ Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One Instant Cross-Platform CGI Programming in Visual Perl 5 with Object Oriented Design in 7 Days Unleashed for Dummies Special Edition with Exclusive Java Chapters for Developers. Year 2000 compliant, Enterprise edition and ISO9000- certified. A Nutshell Handbook Designed For Windows 95/98/NT with a forward by Larry "Bud" Melman. Interactive Multimedia CDROM included. 3rd revised editon, covers Perl5.6. Of course, it will be refered to by its simple acronym: ICPCGIPiVP5wOODi7DU4DSEwEJC4DY2KCEedISO9000-cNHD4W9598NTLBMIMCDROM3edP5.6