[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] Stumper



I'm stumped.  I want to know how many times a certain function is
called inside a lexical block without actually running that block of
code.  For example:

        foo {
            bar();
            bar();
            bar();
        };

Assuming foo() is prototyped (&), how could it know that bar() is
called three times in that block without actually running it?

I'd like to avoid a filter.  Maybe reading the opcodes with B?


(This is a generalization of a problem we've run into on perl-qa).        

-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>	     Kwalitee Is Job One
If you have to shoot, shoot!  Don't talk.
		-- Tuco, "The Good, The Bad And The Ugly"

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe