From: Shlomi Fish Date: Wed, 7 Nov 2012 22:37:51 +0000 (+0200) Subject: Small cleanups. X-Git-Tag: upstream/5.20.0~4852^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb031de9b60d2bbee19e18b38d13c35a346db192;p=platform%2Fupstream%2Fperl.git Small cleanups. --- diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 2f9e197..24b85ef 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -7671,17 +7671,24 @@ sub ornaments { if ( defined $term ) { # We don't want to show warning backtraces, but we do want die() ones. - local ( $warnLevel, $dieLevel ) = ( 0, 1 ); + local $warnLevel = 0; + local $dieLevel = 1; # No ornaments if the terminal doesn't support them. - return '' unless $term->Features->{ornaments}; - eval { $term->ornaments(@_) } || ''; + if (not $term->Features->{ornaments}) { + return ''; + } + + return (eval { $term->ornaments(@_) } || ''); } # Use what was passed in if we can't determine it ourselves. else { $ornaments = shift; + + return $ornaments; } + } ## end sub ornaments =head2 C @@ -7701,10 +7708,10 @@ sub recallCommand { } # Build it into a printable version. - $prc = $rc; # Copy it + $prc = $rc; # Copy it $prc =~ s/\\b$//; # Remove trailing \b $prc =~ s/\\(.)/$1/g; # Remove escapes - $prc; # Return the printable version + return $prc; # Return the printable version } ## end sub recallCommand =head2 C - where the line number information goes