![]() |
|
Just another Perl shrine | |
PerlMonks |
Re: Re: A (kinda) Circular Cacheby mr.nick (Chaplain) |
on Mar 24, 2001 at 00:06 UTC ( #66723=note: print w/replies, xml ) | Need Help?? |
in your get method will return undef if $data is not defined (at least, if the sub's been called in a scalar context, which it will be, right?), so you could probably just get rid of that first line.
Hehe, I'm terrified of that situation now. I spent probably 10 hours a couple of weeks ago tracking down a problem that was caused by scalar/array contexts and "return" vs. "return undef". I'm playing it safe from now on. Should have did the $size=shift || 30 thing myself though!
In Section
Code Catacombs
|
|