Cine has asked for the wisdom of the Perl Monks concerning the following question:
How do I make a call to a builtin function from XS?
This doesnt work:
T I M T O W T D I
This doesnt work:
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();
T I M T O W T D I
Back to
Seekers of Perl Wisdom