syntax - Can you take a reference of a builtin function in Perl? -
Is the syntax, if any, able to reference a biltin like shift
?
$ shift_ref = $ your_magic_syntax_here;
In the same way you can do a user defined subtype:
sub-test {...} $ test_ref = \ & test;
I have tried the following, which do not work at all:
\ & shift \ & cORE :: shift & amp; 'Change'} \ & amp; {'Core :: shift'}
If necessary your answer may include XS, but I do not want to.
Explanation: I am looking for a general purpose solution that can get fully functional code references from any Biltin. This coderef can be passed to any higher command function, such as the context of a user-defined sub. It seems that so far it is not agreed that this is not possible, should anyone disagree?
No, you can not do the underlying problem that you are trying to solve? There can be a way to do something like this.
"If you have the necessary part of the question again, then your answer may include XS, but I do not like it." Calling made from XS is really hard because Bistin has value It is assumed that they are running as part of a compiled optry and some global variable sets are set. Generally calling some underlying functions is very easy to use, which uses the underlying, although this is not always a function, so you can see things:
buffer = Sv_2mortal (newSVpvf ("(collar (% D)) [3]", (int) frame)); Caller = eval_pv (SVPV_nolen (buffer), 1);
(Prefixing string with Xs instead of going through the necessary hoops to call PPCaller).
Comments
Post a Comment