in reply to package namespace manipulation

You wrote:
    
>    push(@{$namerefs{$var}}, *{$fqvar}{SCALAR})
>                      if defined ${*{$fqvar}{SCALAR}};

Perhaps I am mistaken, but I believe that *{$foo}{SCALAR} is always defined. Try for example:

perl -wle 'print "Yep" if defined *{"NOSUCH"}{SCALAR}'

Replies are listed 'Best First'.
RE: RE: package namespace manipulation
by knight (Friar) on Nov 15, 2000 at 00:32 UTC
    You're right, but that's why I'm dereferencing it to find out if there's a live SCALAR at the end. Your example doesn't actually match what's coded; try:
    perl -wle 'print "Yep" if defined ${*{"NOSUCH"}{SCALAR}}'
      Oh, my mistake; thanks for the correction.

      It still seems to me that it would be simpler to write defined ${$fqvar} instead of defined ${*{$fqvar}{SCALAR}} however.