[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] warnings... boo!
On Jan 2, 2008, at 11:41 AM, Thompson, Kenn wrote:
} else {
no warnings 'uninitialized';
$c->log->debug("is_valid_pagesrc_pagedst($pagesrc,
$pagedst) failed");
Here's a dumb question- if it's one line to initialize, why not
just initialize it instead of saying not to check?
Cause it's not always uninitialized. And I need to leave it alone if
it is initialized, so I'd have to do something like:
unless ($pagesrc) { $pagesrc = "" }
unless ($pagedst) { $pagedstc = "" }
Or I think this would work in 5.10:
$pagesrc //= "";
$pagedst //= "";
Or even
for ($pagesrc, $pagedst) { $_ //= ""; }
But, I like the no warnings thing better than any of those...
(Plus I'm not on Perl 5.10 yet...)
j