The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::iosdiff - Cisco IOS Config Diff

VERSION

version 1.112160

SYNOPSIS

 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;
 }

DESCRIPTION

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.

USAGE

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.

SEE ALSO

The iosdiff program is bundled with this library and provides a command line interface for printing the differences between two files.

AUTHOR

Oliver Gorwits <oliver@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 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.