BUU has asked for the wisdom of the Perl Monks concerning the following question:
I'm playing with patching the perl source and am attempting to create a new super global variable for nefarious purposes. I've added the following code to one of the opcodes in pp_ctl.c:
Which *seems* to work properly. Unfortunately once I compile I can't seem to access my new variable from perl code. That is, when I try to print out what I think is the variable I just set I get undef. Do I need some special magic to make it accessible from perl, or do I need a specific perl command to invoke it? (I've tried $buu_test_i, $main::buu_test_i, and so on).SV* super_i; super_i = get_sv("main::buu_test_i", TRUE); SvIV_set(super_i, 42);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl_API get_sv and SvIV_set
by salva (Canon) on Apr 16, 2006 at 23:34 UTC | |
by BUU (Prior) on Apr 17, 2006 at 00:58 UTC | |
by Util (Priest) on Apr 17, 2006 at 02:10 UTC | |
by BUU (Prior) on Apr 17, 2006 at 03:01 UTC | |
by diotalevi (Canon) on Apr 17, 2006 at 04:47 UTC | |
|
Back to
Seekers of Perl Wisdom