What is really driving me bonkers is if I try the following code:

use strict;
use warnings;

END
{
    print "Look ma, i'm using subroutines!";
    foo::foo();
}

BEGIN 
{
    print "\nouter\n";
    BEGIN
    { print "\ninner\n"; }
}
print "end\n";


BEGIN
{
    package foo;
    foo();
    BEGIN 
    {
        sub foo()
        { print "\nfoo\n"; }
    }
}

I get:


inner

outer
foo::foo() called too early to check prototype at ./ad_module.pl line
21.

foo
end
Look ma, i'm using subroutines!
foo

I don't understand why if BEGIN blocks can have different priorities a
warning would be put out.  I mean, require and use are basically begin
blocks in disguise, and if you need subroutines, variables, or whatever
from a package in a package there needs to be precedence.  But this
doesn't really seem to make sense.  Or does it?

</Scratching my head>

Dan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to