Dan Anderson wrote: > > 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?
[Question shifted] > > > What is really driving me bonkers is if I try the following code: It's a conceptual problem, I think. > use strict; > use warnings; > > END > { > print "Look ma, i'm using subroutines!"; Shouldn't lie to your mama. That is not a subroutine. Its more a macro. I gets compiled vefore anything in the main namespace, other than another begin block. > > foo::foo(); > } > > BEGIN > { > print "\nouter\n"; > BEGIN > { print "\ninner\n"; } > } foo() could be called here, during the flow of execution. > > print "end\n"; > > BEGIN > { > package foo; It cannot be called here, before [by definition, being a BEGIN block] compilation has begun. > > foo(); > BEGIN > { > sub foo() > { print "\nfoo\n"; } > } > } Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]