Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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?
Replies are listed 'Best First'.
Re^2: Detect variable change?
by LanX (Chancellor) on Apr 20, 2011 at 15:25 UTC
    IIRC Devel::ptkdb can be used for CGIs:

    ... from the docs

    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?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2015-11-25 17:41 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (684 votes), past polls