SVN::Web::DiffParser parses diff files and patches. It allows you to access the changes to a file in a standardized way, even if multiple patch formats are used.

A diff may be viewed a series of operations on a file, either adding, removing or modifying lines of one file (the from-file) to produce another file (the to-file). Diffs are generally produced either by hand with diff, or by your version control system (cvs diff, svn diff, ...). Some diff formats, notably unified diffs, also contain null operations, that is lines that

Simplifying a patch involves dropping all null-operations and converting and remove operation followed by an add operation (or an add followed by a remove) of the same size on the same lines into a modify operation.

Fetch the text of the line $N if present or all lines of affected by this operation. For '' (null) and 'REMOVE' operations, these are the lines present before the operation was done ('from-file'. For 'ADD' and 'MODIFY' operations, these are the lines present after the operation was done ('to-file'.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.