On Thu, Apr 05, 2001 at 01:21:47PM -0700, Glenn Linderman wrote:
> > I'm unsure about the "module main" idea. I like that modules as a whole
> > are strict/-w by default. But the "module main" tag causes the same
> > problem Larry is opposed to with BASIC/PLUS "EXTEND". That is, every
> > Perl 6 program begins with "module main". Maybe there's a better way to
> > implement this? ("use 6.0" has much the same problem)
> 
> Some Perl 6 programs might start with "module eludom", or other choices.
> There need be no monopoly on "main".

I think he's saying that its annoying to have to write any sort of tag
that says "Hey, I'm starting a new Perl 6 program here!" at the top of
every single program, much in the same way its tiresome to write "int
main(...)" in every C program.  Then again, we already have to do the
#! thing.


> Then it might be easier to write modules that are testable without a test
> driver.  If you run the module directly, some distinguished block of code
> could be executed that wouldn't be if the module were "included" via
> "require" or "use" (or similar replacement constructs).

See also SelfTest.pm


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
Maybe they hooked you up with one of those ass-making magazines.
        -- brian d. foy as misheard by Michael G Schwern

Reply via email to