For those of you who cannot wait until 5.10 and/or Ponie to be able to use "defined or", H. Merijn Brand has uploaded the
necessary source patches. When you apply this patch to the 5.8.1 source tree, you get a new operator
// (defined-or). This allows you to say
$a // $b
instead of
defined $a ? $a : $b
and
$c //= $d;
instead of
$c = $d unless defined $c;
The operator has the same precedence and associativity as ||.
H. Merijn Brand uses this in his production environments for quite some time already, so it appears to be pretty stable. Of course, using this operator will make your code unportable to "standard" Perl 5.8.1, so YMMV.
Liz