my $DEBUG if exists...
Nick Estes
plug-devel@lists.PLUG.phoenix.az.us
Sat May 12 18:09:01 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, 13 May 2001, der.hans wrote:
> Am 13. May, 2001 schwäzte Nick Estes so:
>
> > > my $gDEBUG = $DEBUG;
> > > my $fx = 'initialize';
> > > my $DEBUG = $fxDEBUG{$fx} and print "got <$fxDEBUG{$fx}>\n" if exists $fxDEBUG{$fx};
> > > print "Entering <$fx>. <$DEBUG> <$fxDEBUG{$fx}> <$gDEBUG>\n";
> > >
> > > The 3rd line assigns a localized $DEBUG regardless of whether or not the
> > > $fxDEBUG{$fx} exists, is defined or just is, e.g. same story using defined
> > > or leaving out exists and defined.
> >
> > Looks like an operator precedence problem, the binding for 'and' is very
> > very loose. Try:
>
> Actually, the and has no effect. I put it in to help debug the problem.
> Reversing the statements or removing the print altogether produce the same
> results.
hmmm... I just threw your code up there through perl, and I can't seem to
reproduce the problem... What version of perl are you using, and what
sort of stuff is stored in %fxDEBUG?
--Nick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE6/1Ltv+hjYTGg7s4RAmMeAJ0Sd2WaZ/mK8j+W2NExHoDjKBI+CACdFHTq
lqQhM4Lv57YGjQvpRaHETtM=
=q8Au
-----END PGP SIGNATURE-----