From fc0efae244f2c4bf8063f5962138c2469dc44e6e Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 16 Feb 2015 18:30:52 +0100 Subject: [PATCH] prefer $@ for eval errors --- browser.plp | 4 ++-- digits.plp | 2 +- latin.plp | 2 +- sc.plp | 2 +- screen.plp | 2 +- writing.plp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/browser.plp b/browser.plp index ad8690f..375f300 100644 --- a/browser.plp +++ b/browser.plp @@ -22,7 +22,7 @@ Html({ say "

Browser compatibility

\n"; -my $caniuse = do 'data/browser/support.inc.pl' or die $! || $@; +my $caniuse = do 'data/browser/support.inc.pl' or die $@ || $!; $_->{verrelease} = { # mark last three (future) versions as unreleased, ensure current isn't map { @@ -99,7 +99,7 @@ given ($get{usage} // 'wm') { 'identifier must be alphanumeric name or 0'; } $canihas = do "data/browser/usage-$_.inc.pl" or do { - printf "

Browser usage data not found: %s", $! || $@; + printf "

Browser usage data not found: %s", $@ || $!; break; }; $usage = $_; diff --git a/digits.plp b/digits.plp index 1031151..ec0d7ff 100644 --- a/digits.plp +++ b/digits.plp @@ -36,7 +36,7 @@ my $scriptname = do 'writing-script.inc.pl'; $_ = qq{$_} for $scriptname->{latn} || (); my @table = do "writing-digits.inc.pl"; -die "Table data not found: $_.\n" for $! || $@ || (); +die "Table data not found: $_\n" for $@ || $! || (); $glyphs->print([map { ref $_ eq 'ARRAY' ? @{$_} : map { ".>$_" } diff --git a/latin.plp b/latin.plp index f8472d7..7723bf1 100644 --- a/latin.plp +++ b/latin.plp @@ -53,7 +53,7 @@ my %scriptname = ( my @table = do 'writing-latn.inc.pl'; if ($! or $@) { - printf "

Table data not found: %s.

\n", $! || $@; + printf "

Table data not found: %s.

\n", $@ || $!; } else { print $glyphs->table([map { diff --git a/sc.plp b/sc.plp index 23d29ec..7207117 100644 --- a/sc.plp +++ b/sc.plp @@ -236,7 +236,7 @@ sub showrange { } my $units = do 'sc-units.inc.pl'; - die "Cannot open unit data: $_\n" for $! || $@ || (); + die "Cannot open unit data: $_\n" for $@ || $! || (); my $grouped = !exists $get{order}; if (exists $get{order}) { $get{order} ||= ''; diff --git a/screen.plp b/screen.plp index 02673ad..0e188c1 100644 --- a/screen.plp +++ b/screen.plp @@ -22,7 +22,7 @@ Html({ <: use Shiar_Sheet::Keyboard 2; -my $info = do 'screen.inc.pl' or die $! // $@; +my $info = do 'screen.inc.pl' or die $@ // $!; my $keys = Shiar_Sheet::Keyboard->new($info); $keys->map($get{map}) or undef $get{map}; $keys->print_rows($get{rows}); diff --git a/writing.plp b/writing.plp index 8ea9a0c..e26b655 100644 --- a/writing.plp +++ b/writing.plp @@ -46,7 +46,7 @@ for ( my @table = do "writing-$source.inc.pl"; if ($! or $@) { print "

$title

\n"; - printf "

Table data not found: %s.

\n", $! || $@; + printf "

Table data not found: %s.

\n", $@ || $!; next; } $glyphs->print($title => [map { -- 2.30.0