Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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"; }

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
Node Status?
node history
Node Type: note [id://1034405]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2018-07-17 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (353 votes). Check out past polls.

    Notices?