Suggestions other than grep -b3 :-)

Eric Wilhelm scratchcomputing at gmail.com
Thu Apr 13 18:54:23 BST 2006


Sorry if this came through twice.  Subscription oddities...


# from Jacqui Caren
# on Thursday 13 April 2006 06:36 am:

>sub ... {
>  my $retval = undef;
>  if (..) {
>    my $retval = {};
>    $retal->{a} = 1;
>  }
>  return $retval;
>}


# from Simon Wistow
# on Thursday 13 April 2006 07:10 am:

>Presumably the double use of my on $retval which would prevent the
>setting of $retval->{a} being returned from the sub.
>
>About the only thing I could suggest was either writing a Debugger or
>using PPI.

In this case, B::Xref will show two "(lexical), intro" events on that 
variable name with the same subroutine name.  That should be a 
dependable indicator.

  http://scratchcomputing.com/developers/perl_guts_tour.html

--Eric
-- 
"Insert random misquote here"
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------


More information about the london.pm mailing list