summary refs log tree commit diff stats
path: root/LICENSE
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-05-10 02:22:05 +0530
committerAndinus <andinus@nand.sh>2020-05-10 02:22:05 +0530
commitb09f4f7cedee63dd9f8e68be92997d5b6a9ecb09 (patch)
tree2267a43ceb6b4c582659d1c77cc0330a9f01dffd /LICENSE
parente706dbbed570099eab64d878b507b903b5d29a7f (diff)
downloadpictor-b09f4f7cedee63dd9f8e68be92997d5b6a9ecb09.tar.gz
Use die instead of warn & exit, simplify the script
Using die makes the program shorter & simpler, initial reason for not
using die was that it exits with 255 code which generally means: "We
died, dunno why" & I thought I knew why so I should exit with
something else.

After talking to a few people looks like it doesn't matter much, I
myself have never written a program that checks for a specific exit
code so I switched to using die.

-	print $line =~ s/\t/: /r and
-	    $total_acronyms++ if
-	    ($line =~ /^\Q${term}\E\t/i);
+	if ($line =~ /^\Q${term}\E\t/i) {
+	    print $line =~ s/\t/: /r;
+	    $total_acronyms++;
+	}

This change was made because the previous version didn't do what I
think it did. I could simply replace and with a comma & it would be
equivalent to the current version but then why not use the current
version? This looks better imo & will be easier to understand later.
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions