in reply to Re: strict refs on / off process time
in thread strict refs on / off process time

How so? For the vars and subs strictures that is certainly true, but refs can only be checked at runtime to see if they're hard or symbolic.

Update: thanks.

Makeshifts last the longest.

  • Comment on Re^2: strict refs on / off process time

Replies are listed 'Best First'.
Re: Re^2: strict refs on / off process time
by Elian (Parson) on Nov 20, 2002 at 15:53 UTC
    Sure, but that checking time is a constant, since regardless of your strict setting perl still needs to know what kind of data is in the scalar. Strictness only determines what perl does after the type is determined.

    Besides, as I said, turning stricture on and off has no runtime penalty, since nothing is done at runtime to turn it on and off. Each op has a set of flags in it that determine a number of behaviors, including stricture. Turning strict on and off just determines, at compile time, what bits get set for the ops that are generated by the compiler. When those ops are actually run the strict setting is embedded inside the ops along with all the other flags.