in reply to Re: Execution order of END/CHECK vs BEGIN/INIT
in thread Execution order of END/CHECK vs BEGIN/INIT

true.

But that's still the BEGIN-in-FIFO/END-in-LIFO that that was being discussed. My point was more to the fact that since this...

package A; BEGIN { ... $a ... } // A's 0th BEGIN use B $a; END { ... } // A's 0th END
...is basically this...
package A; BEGIN { ... } // A's 0th BEGIN BEGIN { require B; import B $a } // A's 1st BEGIN END { ... } // A's 0th END

...you really want to make sure that A's 0th BEGIN block, happens before it's 1st BEGIN block (which so happens to get executed before B's 0th BEGIN block -- if it has one.)

Replies are listed 'Best First'.
Re: Execution order of END/CHECK vs BEGIN/INIT
by Abigail-II (Bishop) on Jun 27, 2003 at 22:53 UTC
    I don't think the OP was wondering about the FIFO-ness of BEGIN, but more about the LIFO-ness of END and CHECK.

    Abigail

      I think the OP was wondering about the LIFO-ness of END and CHECK.

      Quite right. I'm willing to accept that there is a "good" reason to make CHECK and END be LIFO; I'm just wondering what that good reason is.

      blyman
      setenv EXINIT 'set noai ts=2'