in reply to Re: •Re: Is it possible to distinguish contstants from normal subs?
in thread Is it possible to distinguish contstants from normal subs?

If it's optimized out, probably not. I'd try an experiment with B::Deparse to see what the optree looks like.
  • Comment on Re: Re: •Re: Is it possible to distinguish contstants from normal subs?

Replies are listed 'Best First'.
Re: Re: Re: •Re: Is it possible to distinguish contstants from normal subs?
by samtregar (Abbot) on May 19, 2002 at 05:00 UTC
    I think it should be possible, but I got stumped trying to figure out how to get the starting OP from an eval"". If I can do that then I can run a simple B::Utils::opgrep() and look for an entersub OP. If there is one, then the subroutine isn't a constant.

    -sam