in reply to Re^8: XS: use module into package
in thread XS: use module into package
I'm just trying to replicate use as it is internally for perl
use is a compiler directive to immediately do a require and (possibly) import.
To replicate that, your code would need to be parsing Perl code. Your statement makes no sense.
but do if I use a goto &feature::import.
«goto &feature::import» has no resemblance to «eval 'package Package; use Module;'» and has nothing to do with «use»!!!
This is getting silly. You have yet to communicate what problem you are trying to solve. When you figure it out, you should start a new thread.
Nothing against eval, I just think that the behaviour is inconsistent for lexical "uses".
What do you think use does with the code it loads? It evals it.
|
|---|