Permalink
Browse files

Perlito5 - js2 - p5call_sub() placeholder for AUTOLOAD

  • Loading branch information...
1 parent 8d65dd4 commit 643adaba89db4dfc3a6c1d07b685c9b9145b7ee8 @fglock committed Nov 21, 2012
Showing with 22 additions and 2 deletions.
  1. +1 −1 TODO-perlito5
  2. +10 −0 html/perlito5.js
  3. +1 −1 perlito5.pl
  4. +10 −0 src5/lib/Perlito5/Javascript2/Runtime.pm
View
@@ -280,7 +280,7 @@ TODO list for Perlito5
-- AUTOLOAD
AUTOLOAD is implemented for method lookups, but not for normal subroutines
-
+ see: p5call_sub()
* Nice to Have
View
@@ -173,6 +173,16 @@ function p5call(invocant, method, list) {
}
+function p5call_sub(namespace, name, list) {
+ if(p5pkg[namespace].hasOwnProperty(name)) {
+ // TODO
+ }
+ if(p5pkg[namespace].hasOwnProperty("AUTOLOAD")) {
+ // TODO
+ }
+ p5pkg.CORE.die(["Undefined subroutine &" + namespace + "::" + name]);
+}
+
p5make_package("main");
p5pkg["main"]["v_@"] = []; // $@
p5pkg["main"]["v_|"] = 0; // $|
Oops, something went wrong.

0 comments on commit 643adab

Please sign in to comment.