in reply to Re: Re: (Segfault) Re: is_constant() - a routine that detects constant subs
in thread is_constant() - a routine that detects constant subs

i'm sorry, perhaps i wasn't clear. i was using bar/baz and zip/zap as non-constant/constant pairs. you are correct in that an empty prototype is a necessary condition for a subroutine to be optimized to a constant.

and truly, thanks for this code. i've been working on a module (possibly named Devel::TrackSub,) which will wrap all subs in any namespaces you specify. it'll be posted as soon as i finish the pod--perhaps tomorrow.

developing this code was my first attempt at walking the symbol table, and at first seemed a little over my head. i think i've found an elegant solution that can be quite instrumental to others. i'm excited to post it soon.

i think you've done the same here.

~Particle *accelerates*

  • Comment on Re^3: (Segfault) Re: is_constant() - a routine that detects constant subs