in reply to Sequential defined-or operators
While you remain pre-5.10, you might like this technique:
use List::Util qw( first ); my $theme = first { defined $_ } ( $global_config->{modes}{$current_mode}{theme}, $theme_config->{current_theme}, $default_theme, 'none', );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Sequential defined-or operators
by plobsing (Friar) on Jan 15, 2008 at 02:39 UTC | |
by ikegami (Patriarch) on Jan 15, 2008 at 03:28 UTC |