Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Detect variable change?

by tospo (Hermit)
on Apr 20, 2011 at 08:38 UTC ( #900291=note: print w/ replies, xml ) Need Help??


in reply to Detect variable change?

You could achieve this with the Perl debugger. The trick is to get an interactive debugger session into your CGI script as you interact with it through a web page. I do this with Catalyst apps and it fires of a terminal on my system when the code encounters a "$DB::single=1;" line. I'm not sure exactly how to acheive this with a simple CGI script but this thread here Debugging CGI/PERL has some advice on that.
Once you have the debugger session you can monitor a variable by setting a watch expression (w NAME_OF_VARIABLE), which will be triggered whenever the value of the variable changes.


Comment on Re: Detect variable change?
Re^2: Detect variable change?
by LanX (Canon) on Apr 20, 2011 at 15:25 UTC
    IIRC Devel::ptkdb can be used for CGIs:

    ... from the docs

    PTKDB_DISPLAY
    Sets the X display that the ptkdb window will appear on when invoked. Useful for debugging CGI scripts on remote systems.

    Cheers Rolf

    UPDATE: see Re: Debugging CGI/PERL

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://900291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-08-22 22:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls