Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Perl Crash attempting to run Tcl code

by Anneq (Vicar)
on May 20, 2013 at 20:59 UTC ( #1034405=note: print w/replies, xml ) Need Help??

in reply to Perl Crash attempting to run Tcl code

Maybe put die statements, like below, in different parts of your code to at least see what IS working before perl fails. Then you can narrow down the problem code.

die "I'm here in $self sub() at line ##.\n";

Sometimes, when you run code from the command line, rather from some other way of launching it, your @INC paths and environment variables might not be the same. Put this at the very top of your script and run in both scenarios:

use strict; use warnings; $|=1; # Buffering BEGIN { print "#### Environment Variables ####\n"; foreach (keys(%ENV)) { print "$_ = $ENV{$_}\n"; } print "#### \@INC ####\n"; foreach(@INC) { print "$_\n"; } die "#### \%ENV & \@INC: ####\n"; }


Replies are listed 'Best First'.
Re^2: Perl Crash attempting to run Tcl code
by bkobs39 (Acolyte) on May 21, 2013 at 12:37 UTC

    Thanks for the suggestion. I added the code and verified that the environmental variables are identical when I run with Perl's Tcl module and when I run the 'tclsh' and output with 'parray env'.

    Also, the point at which the script fails is here:

    $interp->Eval('set iw [dp_MakeRPCClient <ip> <port>]');

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2022-01-20 10:28 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.