Subject: | text_compare.pl does not handle missing files gracefully |
If an input file to text_compare does not exist, seems to proceed
through the code and errors off very dramatically. Should catch this
sooner, and error off more gracefully.
CASE 1 -----------------------------------------
text_compare.pl --no-normalize --verbose --type
Text::Similarity::Overlaps test1 test2xx
(/home/cs/tpederse/MyPerlLib/Text/Similarity.pm:56) Unknown option: compfile
(/home/cs/tpederse/MyPerlLib/Text/Similarity/Overlaps.pm:75) The file
'test2xx' does not exist
CASE 2 ------------------------------------------
text_compare.pl --type Text::Similarity::Overlaps test1 test2xx
(/home/cs/tpederse/MyPerlLib/Text/Similarity.pm:56) Unknown option: compfile
(/home/cs/tpederse/MyPerlLib/Text/Similarity/Overlaps.pm:75) The file
'test2xx' does not exist
CASE 3 ---------------------------------------------
marimba(20): text_compare.pl --type Text::Similarity::Overlaps test1xx
test2xx
(/home/cs/tpederse/MyPerlLib/Text/Similarity.pm:56) Unknown option: compfile
(/home/cs/tpederse/MyPerlLib/Text/Similarity/Overlaps.pm:71) The file
'test1xx' does not exist