in reply to Re^2: Avoiding reference of sub optimization
in thread Avoiding reference of sub optimization

Actually I'm blessing them into a dedicated class to set attributes, so subs with the same body can have different attributes. (like debug informations)
Any reason why you aren't using a closure then? Which ought to give you exactly that, plus give you different references as preferred....
  • Comment on Re^3: Avoiding reference of sub optimization

Replies are listed 'Best First'.
Re^4: Avoiding reference of sub optimization
by LanX (Saint) on Mar 21, 2011 at 15:02 UTC
    Making them all closures is what I'm planning to do now.

    I was using an inside-out mechanism to set the attributes (a hash as class-variable with the subref as key) but know I'm thinking about closing over a hash %attribute at generation.

    So no practical problem, just asking for insight.

    Cheers Rolf