There's more than one way to do things | |
PerlMonks |
Re^3: Odd lexical variable behavior -- why does this happen?by radiantmatrix (Parson) |
on Sep 13, 2007 at 15:36 UTC ( [id://638831]=note: print w/replies, xml ) | Need Help?? |
Aha! Thank you! The work-around you presented is one approach, my particular answer was to on the way out of scope. Thanks for shedding light on this, I don't know how or why I missed this when I scanned ProgressBar.pm... As for "Changing the var that holds the progress shouldn't change the value of the progress bar", I sort of disagree. Since ProgressBar doesn't actually update that variable, I'd expect that changing to a different variable, you'd want to use that variable's value. As the documentation for Tk::ProgressBar says about -variable: Specifies the reference to a scalar variable to link to the ProgressBar. Whenever the value of the variable changes, the ProgressBar will upate to reflect this value. I'd expect that changing variables entirely would also change "the value of the variable", but obviously others (including the original author) have different expectations. Thanks again for the insight. ++!
<–radiant.matrix–>
Ramblings and references The Code that can be seen is not the true Code I haven't found a problem yet that can't be solved by a well-placed trebuchet
In Section
Seekers of Perl Wisdom
|
|