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

Sorry, but your still missing (what I think) is the point.

Why should it matter what order you use the modules in?

And that's my point. It shouldn't. But if it didn't, then perl wouldn't go to the bother of inverting the natural order of their execution.

If the order of the modules (specifically those that have END blocks) doesn't matter, then why does Perl bother to impose this peculiar ordering of execution?

The reason offered elsewhere in this thread is it is necessary to have DB modules execute their END blocks after their callers END blocks, so that the caller had a chance to save their datasets, prior to the DB module dropping its connection. I assumed that you had read this too.

I'll shut up now as requested.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


  • Comment on Re: Re: Re: Re: Re: Re: Execution order of END/CHECK vs BEGIN/INIT