App::iosdiff - Cisco IOS Config Diff
use App::iosdiff qw/diff/; my @output = diff({ left => 'from_this_file', right => 'to_this_file', }); if (scalar @output == 0) { print "no differences!\n"; } else { print @output; }
This library provides one subroutine to run an intelligent context aware diff between two files in Cisco IOS-style configuration format.
Whilst an ordinary diff works on IOS-style configuration files, it doesn't show the context in a useful way. For example if one line changes within an interface configuration, you're likely not to see the interface name in a standard 3-line contextual diff. This program improves that by showing the full context of any difference.
In terms of IOS-style configuration, this context means either the "section" such as an interface or class-map (a header with indented lines), or the command group such as an access control list, where the lines share common leading text.
See the above "SYNOPSIS" for an example.
Lines in the files which are comments (begin with "!") will be stripped from the file before the comparison is made.
!
The iosdiff program is bundled with this library and provides a command line interface for printing the differences between two files.
Oliver Gorwits <oliver@cpan.org>
This software is copyright (c) 2016 by University of Oxford.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::iosdiff, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::iosdiff
CPAN shell
perl -MCPAN -e shell install App::iosdiff
For more information on module installation, please visit the detailed CPAN module installation guide.