The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

diff-bifcode - compare files containing Bifcode

SYNOPSIS

diff-bifcode FILE1 FILE2 [OPTIONS...]

DESCRIPTION

The diff-bifcode utility compares two files contining Bifcode. For example, if file1 contains:

{U3:oneI1,U3:twoI2,}

And file2 contains:

{U3:oneI1,U5:threeI3,U3:twoI2,}

Then running diff-bifcode against the two results in the following:

$ diff-bifcode file1 file2
@@ -2,6 +2,8 @@
 {
 U3:one
 I1,
+U5:three
+I3,
 U3:two
 I2,
 }

A warning is printed to stderr if either file does not contain valid Bifcode.

Bifcode does not allow trailing newlines which makes it a little tricky to create them with a text editor. You can use the --strip | -s options to strip newlines from the end of each file before parsing.

EXIT VALUE

This command exists with a value of 0 when the files match, and 1 when they do not.

SEE ALSO

This utility is a tiny command-line wrapper around the Bifcode diff_bifcode() function.

AUTHOR

Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE

Copyright 2017 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.