$scheme = $cookies{'skin'}
? ( ( param( 'scheme' )
and param( 'scheme' ) =~ /^\w{1,6}$/ )
? param( 'scheme' )
: $cookies{'skin'}->value )
: ( ( param( 'scheme' )
and param( 'scheme' ) =~ /^\w{1,6}$/ )
? param( 'scheme' )
: 'default' );
####
use strict;
use warnings;
sub ttw {
my( $cookie, $param ) = @_;
my $str = '(' . (defined $cookie ? $cookie : 'undef');
$str .= ',' . (defined $param ? $param : 'undef') . "):\t";
$str .= $cookie ||= $param && $param =~ /^\w{1,6}$/ ? $param : 'default';
$str .= "\n";
return $str;
}
sub ttd {
my( $cookie, $param ) = @_;
my $str = '(' . (defined $cookie ? $cookie : 'undef');
$str .= ',' . (defined $param ? $param : 'undef') . "):\t";
$str .= $cookie ||= $param && $param =~ /^\d{1,2}$/ ? $param : 5;
$str .= "\n";
return $str;
}
print ttw( 'yellow', 'blue' );
print ttw( 'green', undef );
print ttw( undef, 'teal' );
print ttw( undef, 'chartreuse' );
print ttw( undef, undef );
print ttd( undef, undef );
print ttd( 4, undef);
print ttd( 444, undef);
print ttd( undef, 3);
print ttd( undef, 333);
print ttd( 6, 7);
####
(yellow,blue): yellow
(green,undef): green
(undef,teal): teal
(undef,chartreuse): default
(undef,undef): default
(undef,undef): 5
(4,undef): 4
(444,undef): 444
(undef,3): 3
(undef,333): 5
(6,7): 6
####
$scheme = $cookies{'skin'} ||= param( 'scheme' )
&& param( 'scheme' ) =~ /^\w{1,6$/
? param( 'scheme' )
: 'default';
####
$scheme = $cookies{'skin'}->value ||= param( 'scheme' )
&& param( 'scheme' ) =~ /^\w{1,6$/
? param( 'scheme' )
: 'default';
####
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } sig
map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu" );