On Thursday 11 October 2012 20:53:08 Andy Bach wrote:
> On Thu, Oct 11, 2012 at 4:36 AM, Gary Stainburn
>
> <gary.stainb...@ringways.co.uk> wrote:
> >> Is there a quick and easy way to detect which method called it?
> >
> > my $xinetd=(defined $ENV{REMOTE_HOST});
>
> MIght be interesting to see what else is set in the environment,
> adding something like:
> warn("$_ -> $ENV{$_}\n") foreach keys %ENV;
>
> will dump them to STDERR (or open a log) so you could compare.

Andy, That's how I found out about REMOTE_HOST. I chose that one because it 
was usefull as I can now log where requests have come from too.

The full list was:

LANGSH_SOURCED : 1
PREVLEVEL      : N
CONSOLETYPE    : vt
UPSTART_EVENT  : runlevel
LC_COLLATE     : en_US
RUNLEVEL       : 3
LC_ALL         : en_US
previous       : N
LC_NUMERIC     : en_US
PWD            : /
LC_TIME        : en_US
LANG           : en_US
LC_MESSAGES    : en_US
runlevel       : 3
SHLVL          : 3
UPSTART_JOB_ID : 6
LC_MONETARY    : en_US
_              : /usr/sbin/xinetd
PATH           : /sbin:/usr/sbin:/bin:/usr/bin
REMOTE_HOST    : ::ffff:10.5.1.2
TERM           : linux
UPSTART_JOB    : rc3

-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to