in reply to Mason's interpretation of INIT blocks

Do you get a "Too late to run INIT block" warning?

If Mason is only compiling your code after the main perl run phase has started, you'd expect the INIT block to not be run, with a warning.

If you can, avoid using INIT in modules, ever. Since it is tied to beginning the main run phase, it is only well suited for use in your main program (which doesn't exist in Mason?) If you can't, you may need something like Manip::END, only for INIT blocks. They are also accessible via B::init_av and object_2svref.

  • Comment on Re: Mason's interpretation of INIT blocks