Skip to content

Reading weight graphs #1

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Reading weight graphs #1

wants to merge 6 commits into from

Conversation

MoriTanosuke
Copy link

I tried to add weight graph parsing to the API today and I can read the description with the actual values and parse it. But I could only print it to the debug logger, but when I tried to use it from the test_client.pl script, it is always returning 1 instead of my current weight...

Can you have a look at it and give me a hint for a solution?

@ericblue
Copy link
Owner

Hi,

I don't have time to review the code in detail right now, but at a glance it might be something as simple as string concatenation in your test client script. It's more than likely returning the value "1" due to the way you're printing out the value of get_weight_log. The return value is an array, and since you're using a period (.) to concatenate the string it's treating the array as a scalar (1 = total elements in the array). Try using a comma instead. Also, when in doubt try using Data::Dumper to print out the return call.

@MoriTanosuke
Copy link
Author

Ah, thanks for the hint. The different data structures and the implicit conversions in Perl are my main enemy. I try to fix this in the evening.

… converted from array to scalar in API.pm, line 574+.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants