#!perl use 5.010001; use strict; use warnings; use File::Slurper qw(read_lines); use Text::DiffU; unless (@ARGV == 2) { warn "Usage: diff-u <file1> <file2>\n"; exit 1; } print Text::DiffU::diff_u( seq1 => [read_lines $ARGV[0]], seq2 => [read_lines $ARGV[1]], seq1_name => $ARGV[0], seq2_name => $ARGV[1], ); # ABSTRACT: Diff two files and show unified-style diff # PODNAME: diff-u __END__ =pod =encoding UTF-8 =head1 NAME diff-u - Diff two files and show unified-style diff =head1 VERSION This document describes version 0.001 of diff-u (from Perl distribution App-TextDiffUUtils), released on 2017-08-19. =head1 HOMEPAGE Please visit the project's homepage at L<https://metacpan.org/release/App-TextDiffUUtils>. =head1 SOURCE Source repository is at L<https://github.com/perlancar/perl-App-TextDiffUUtils>. =head1 BUGS Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-TextDiffUUtils> When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 AUTHOR perlancar <perlancar@cpan.org> =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2017 by perlancar@cpan.org. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut