Debugging a Control script
Posted: Mon Jul 18, 2016 10:15 pm
I am attempting to get a control script for a Keekoon camera working. I started with onvif.pm and have read all the others, rather a lot of Perl monk stuff and quite a lot of Perl manual. I am at the point where I need to get some debugging info out into logs and I just can't seem to even get that working usefully.
My basic strategy is to use the Control Address in the following format: http://admin:adminpass@10.10.10.1:80, parse it into the real URL along with basic auth and send that to the camera.
This is the offending script: http://pastebin.com/jJWK4y5w
I would like to dump the URL I think I'm gathering in line 129-130 but it never even appears in the logs/db when I put a Debug( $url); line in 131(ish). I've also tried a few other ways of putting in Debug statements but it never seems to work. I have restarted ZM quite a few times, and spent a fair amount of time on stack overflow ...
It is a big ask to beg someone to cast a quick eye across my script but beyond making sure that it at least passes "perl -Mstrict -Mdiagnostics -cw Keekoon.pm" as a lint test and staring at it until my eyes water, I am at a loss as to what I've done wrong, with respect to debug output or functionally.
Cheers
Jon
My basic strategy is to use the Control Address in the following format: http://admin:adminpass@10.10.10.1:80, parse it into the real URL along with basic auth and send that to the camera.
This is the offending script: http://pastebin.com/jJWK4y5w
I would like to dump the URL I think I'm gathering in line 129-130 but it never even appears in the logs/db when I put a Debug( $url); line in 131(ish). I've also tried a few other ways of putting in Debug statements but it never seems to work. I have restarted ZM quite a few times, and spent a fair amount of time on stack overflow ...
It is a big ask to beg someone to cast a quick eye across my script but beyond making sure that it at least passes "perl -Mstrict -Mdiagnostics -cw Keekoon.pm" as a lint test and staring at it until my eyes water, I am at a loss as to what I've done wrong, with respect to debug output or functionally.
Cheers
Jon