Guten Tag Kristis Makris,
am Samstag, 5. März 2011 um 05:40 schrieben Sie:

>> Variable "$waitedpid" will not stay shared at
[...]
> I haven't seen this before:

I did, as we are currently working in supporting mod_perl and I've
read exactly about that:

http://perl.apache.org/docs/1.0/guide/porting.html#The_First_Mystery

The problem occurs if you have a my-decalarted variable in a sub
routine and use this variable in an inner sub routine without passing
the value to that inner sub routine.

sub something
{
  my $var = 'irgendwas';
  inner();

  sub inner
  {
    # use $var without passing it resolves in the error
  }
}

better:

sub something
{
  my $var = 'irgendwas';
  inner($var);

  sub inner
  {
    my $var2 = shift;
    # use $var2, not $var
  }
}

You should avoid using "our" or "use vars ()" as in the mod_perl
examples and pass the variables to the functions which need them.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning
AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig
 
Telefon: Potsdam: 0331-743881-0
E-Mail:  [email protected]
Web:     http://www.am-soft.de

AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow

_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to