Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Perl Crash attempting to run Tcl code

by Anneq (Vicar)
on May 20, 2013 at 20:59 UTC ( [id://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"; }

Anne

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-18 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found