Cine has asked for the wisdom of the Perl Monks concerning the following question:
This doesuse Inline C => q{ void c_time() { SV* val = get_cv("localtime", FALSE); if (!val) croak("Name does not exists!"); call_sv(val,GIMME_V); } }; print scalar c_time();
sub helper { localtime(); } use Inline C => q{ void c_time() { SV* val = get_cv("helper", FALSE); if (!val) croak("Name does not exists!"); call_sv(val,GIMME_V); } }; print scalar c_time();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling perl builtins from C
by chromatic (Archbishop) on Aug 04, 2003 at 20:30 UTC | |
|
Re: Calling perl builtins from C
by revdiablo (Prior) on Aug 04, 2003 at 20:14 UTC | |
by Cine (Friar) on Aug 04, 2003 at 20:16 UTC |