Re: BEGIN <> BEGIN




Ferry Bolhar wrote:
Hi,

I understand that a "use <module> <vars>;" is similar to

BEGIN {>
Are these BEGIN blocks special in some way? Are
require <module>;
<module>->import(<args>);
}

When writing BEGIN blocks myself and looking at the
compiled script with B::Deparse, I can see my BEGIN
blocks, but not the BEGIN blocks created by "use".

these actually BEGIN blocks or just blocks behaving
_similar_ to BEGIN blocks?

Until now, I thought the binary code trees of BEGIN blocks
(and later of CHECK blocks as well) are removed after
they have executed. Is this true? In other words: does a
B::Bytecode-d script still contain BEGIN and CHECK
blocks and are these executed whenever the script starts?
If not, where can I place code I want to be executed
_before_ the main scripts code gets executed? Is it this
what INIT blocks were made for?

MTAI for your answers, and kind greetings from Vienna

Ferry

--
Ing. Ferry Bolhar
Municipality of Vienna, Department 14
A-1010 Vienna / AUSTRIA
E-mail: bol@xxxxxxxxxxxxxxxxx

hrmm......

this doesnt look like perl to me, is this a mod or style i am not
familiar with? this looks more like C or C++

.



Relevant Pages

  • BEGIN <> BEGIN
    ... When writing BEGIN blocks myself and looking at the ... compiled script with B::Deparse, ... B::Bytecode-d script still contain BEGIN and CHECK ... and kind greetings from Vienna ...
    (comp.lang.perl.misc)
  • Re: Field name nomenclature (L, W, B etc)
    ... PCB (process control block). ... but there is code which converts MACRO-32 to suitable C ... Ferry Bolhar ... A-1010 Vienna / AUSTRIA ...
    (comp.os.vms)
  • Re: How to clear device errors w/o reboot?
    ... If you are on an older release, the rest of the FAQ text ... There is no such command on my V7.3-2 system: ... Ferry Bolhar ... A-1010 Vienna / AUSTRIA ...
    (comp.os.vms)
  • Re: Field name nomenclature (L, W, B etc)
    ... >> the C compiler... ... Do you think that PL/1 is a better choice? ... Ferry Bolhar ... A-1010 Vienna / AUSTRIA ...
    (comp.os.vms)
  • Re: read monitor (>>>) variables from OpenVMS ?
    ... Perhaps you're on a VAX? ... F$GETENV exists on Alpha only. ... Ferry Bolhar ... A-1010 Vienna / AUSTRIA ...
    (comp.os.vms)