Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Perlito5 - js2 - p5call_sub() placeholder for AUTOLOAD
  • Loading branch information
fglock committed Nov 21, 2012
1 parent 8d65dd4 commit 643adab
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TODO-perlito5
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions html/perlito5.js
Expand Up @@ -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; // $|
Expand Down

0 comments on commit 643adab

Please sign in to comment.