umasuresh has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I am trying to invoke the ptkdb.pm module which is installed locally using the following command:
perl -d:ptkdb my_perl_script.pl

This is what I tried so far:
After making a softlink of the two directories required for using this module (Devel, Tk) in the directory that I am running the script:
perl -d:ptkdb my_script.pl couldn't connect to display ":0" at /usr/lib64/perl5/vendor_perl/5.8.8 +/x86_64-linux-thread-multi/Tk/MainWindow.pm line 55. MainWindow->new() at Devel/ptkdb.pm line 1147 Can't call method "setup_main_window" on unblessed reference at Devel/ +ptkdb.pm line 4151.
How do I make this work? Thanks much!

Replies are listed 'Best First'.
Re: How to invoke a module installed locally?
by choroba (Cardinal) on Dec 02, 2010 at 16:44 UTC
    Is your X server running on the :0 display?
      Hi Choroba,
      Thanks much for your hint. Following your hint and my colleagues:
      ssh -X remote_location
      This enabled X11 forwarding and then when I invoke the
      perl -d:ptkdb script.pl
      it works like a charm!
        yes....ssh sets up the variables in your terminal session for the X server/client communication to work. you could have set those up yourself as well. X needs to know the endpoint for the communication..which in the end is an ip address and port number.
        the hardest line to type correctly is: stty erase ^H