-
Notifications
You must be signed in to change notification settings - Fork 3
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
I want to use this with a class but seems to not be working #2
Comments
Hi, I needed that too. But the perlfunc does not handle classes/constructors afaik, only functions. Stefan |
As @szwijsen commented, this little script is just for functions. The object lives in the Perl space. Your script is executed once, everything is created, the result is serialized upon return, and then everything in the Perl space is destroyed. |
Hi @boriel and @szwijsen , thanks for the reply! I also thought about @szwijsen solution, unfortunately, as you said, the object lives in Perl space, I am not sure if it keeps the object memory once the function returns? does it? The thing is that I need to keep track of the data in the created object, not just to access its functions. What I am trying right now is pyperler, seems to be working with objects, I had initially some problems with the installation because if requires the Perl compilation with multiple threads (I did not know at the time so I have to debug the setup because I am using a very old system). |
@rmarinbe serialization also returns lists and not sure if it also returns dicts. It uses strings to serialize (encode) the data. |
for example, how do I use the constructor? suppose that you have a class called Person defined in Person.pm
in Perl:
$person = new Person;
in Python
The text was updated successfully, but these errors were encountered: