in reply to Is it possible to determine the eval block accumulator?
#!/usr/bin/perl use strict; use warnings; use Inline 'C'; eval 'print "Hello, world\n"'; printf "Sequence number: %d\n", gimmi (); eval 'print "Hello, earthlings\n"'; printf "Sequence number: %d\n", gimmi (); __END__ __C__ int gimmi () { return (PL_evalseq); }
That that if you run this the first time, you'll get high numbers, but that's because Inline and/or Inline::C will do some evalling as well. After that, the count starts at 2, probably also because of some evalling inside Inline and/or Inline::C.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Is it possible to determine the eval block accumulator?
by BlacKat (Novice) on Feb 15, 2003 at 00:36 UTC |