-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supposedly blessed reference is not blessed #35
Comments
I've pushed a fix - "implemented 1-argument bless()": diff --git a/src5/lib/Perlito5/Javascript2/Emitter.pm
2015-12-08 20:15 GMT+01:00 kurpitsa [email protected]:
|
Ok, seems to work, thanks! |
I have a file A.pm:
package A;
sub test {
bless {};
}
sub somemethod {
print "test";
}
1;
and test.pl:
use A;
works:
A->somemethod();
dies:
A->test()->somemethod();
Now if i run
Output is:
testtest
But if instead
I get:
testCan't locate object method "somemethod" via package "undefined" (perhaps you forgot to load "undefined"?) at ./test.pl line 13
Error
at CORE.die (/home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:2746:28)
at p5call (/home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:192:20)
at eval (eval at (/home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42606:56), :17:2)
at eval (eval at (/home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42606:56), :19:3)
at /home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42606:11
at /home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42627:7
at /home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42643:6
at /home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42950:5
at /home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42963:4
at Object. (/home/ipe/Fortress/game_perl/Perlito-master/perlito5.js:42964:3)
So the method test does not return a blessed reference as it should. I have compiled perlito5.js using build-5js.
The text was updated successfully, but these errors were encountered: