Commits

Palmer, 2E0EOL  committed 40eff57 Merge

Merge latest experimental branch fixes

  • Participants
  • Parent commits 9443258, 1726806
  • Branches f/201201-palmer-writer

Comments (0)

Files changed (1)

File t/example1.t

 
 use constant EXIT_SUCCESS => (0);
 use constant EXIT_FAILURE => (1);
+
+use constant MIN_VERSION => '0.1.0';
+#----------------------------------------------------------------------------
+sub CheckVersion()
+{
+	if ( $Daybo::Checksum::Base::VERSION lt MIN_VERSION() ) {
+		printf(
+			STDERR "Error: Daybo::Checksum %s required, %s installed.\n",
+			MIN_VERSION(), $Daybo::Checksum::Base::VERSION
+		);
+		return 0;
+	}
+	return 1;
+}
 #----------------------------------------------------------------------------
 sub Main()
 {
 	);
 
 	getopts('v', \%opts);
+	return EXIT_FAILURE() unless CheckVersion();
 	$readCount = $reader->Read(FileName => INPUT_CHECKSUM_FILE());
 	if ( $readCount ) {
 		my $writeCount;