On 1/9/03 11:27 PM, Michael G Schwern wrote:
> On Thu, Jan 09, 2003 at 11:15:49PM -0500, John Siracusa wrote:
>> On 1/9/03 10:10 PM, Michael G Schwern wrote:
>>> I would assume it to be a compiler hint via subroutine attribute.
>>> 
>>>   sub debug ($msg) is off {
>>>     print STDERR $msg;
>>>   }
>>> 
>>> some "this subroutine is a no-op if a flag is set" attribute.
>> 
>> Hm, not quite as convenient as setting a package global (constant)
>> somewhere.  Maybe that same "off" bit could be set "from a distance" at
>> compile time?
> 
> That would be the "if a flag is set" part.  Point is, its easily handled
> by some sort of subroutine attribute which looks at some flag somewhere.

Well, er, don't we need to decide what the subroutine attribute is, so that
the compiler will know to honor it and make the code "disappear"?  It
doesn't seem like a feature that can be added from "userland" after the fact
(but maybe I'm wrong...)

-John

Reply via email to