1Diff::LibXDiff(3)     User Contributed Perl Documentation    Diff::LibXDiff(3)
2
3
4

NAME

6       Diff::LibXDiff - Calculate a diff with LibXDiff (via XS)
7

VERSION

9       Version 0.05
10

SYNOPSIS

12           use Diff::LibXDiff;
13
14           my $string1 = <<_END_
15           apple
16           banana
17           cherry
18           _END_
19
20           my $string2 = <<_END_
21           apple
22           grape
23           cherry
24           lime
25           _END_
26
27           my $diff = Diff::LibXDiff->diff( $string1, $string2 )
28           my $bin_diff = Diff::LibXDiff->bdiff( $bin_string1, $bin_string2 )
29
30           # $diff is ...
31
32           @@ -1,3 +1,4 @@
33            apple
34           -banana
35           +grape
36            cherry
37           +lime
38

DESCRIPTION

40       Diff::LibXDiff is a binding of LibXDiff
41       (<http://www.xmailserver.org/xdiff-lib.html>) to Perl via XS
42
43       LibXDiff is the basis of the diff engine for git
44

METHODS

46   $diff = Diff::LibXDiff->diff( $string1, $string2 )
47       Calculate the textual diff of $string1 and $string2 and return the
48       result as a string
49
50   $patched = Diff::LibXDiff->patch( $original, $patch )
51   ( $patched, $rejected ) = Diff::LibXDiff->patch( $original, $patch )
52       Calculate the patched string given an original string and a patch
53       string
54
55       If the patching algorithm cannot place a hunk, it will return a second
56       "rejected" result (if called in list context)
57
58   $bdiff = Diff::LibXDiff->bdiff( $bin1, $bin2 )
59       Calculate the binary diff of $bin1 and $bin2 and return result as a
60       string
61
62   $bpatched = Diff::LibXDiff->bpatch( $original, $patch )
63       Calculate the patched binary given an original string and a patch
64       string
65

AUTHOR

67       Robert Krimen, "<rkrimen at cpan.org>"
68

SEE ALSO

70       <http://www.xmailserver.org/xdiff-lib.html>
71
72       Algorithm::Diff
73

BUGS

75       Please report any bugs or feature requests to "bug-diff-libxdiff at
76       rt.cpan.org", or through the web interface at
77       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Diff-LibXDiff>.  I will
78       be notified, and then you'll automatically be notified of progress on
79       your bug as I make changes.
80

SUPPORT

82       You can find documentation for this module with the perldoc command.
83
84           perldoc Diff::LibXDiff
85
86       You can also look for information at:
87
88       •   RT: CPAN's request tracker
89
90           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Diff-LibXDiff>
91
92       •   AnnoCPAN: Annotated CPAN documentation
93
94           <http://annocpan.org/dist/Diff-LibXDiff>
95
96       •   CPAN Ratings
97
98           <http://cpanratings.perl.org/d/Diff-LibXDiff>
99
100       •   Search CPAN
101
102           <http://search.cpan.org/dist/Diff-LibXDiff/>
103

ACKNOWLEDGEMENTS

106       Copyright 2009 Robert Krimen, all rights reserved.
107
108       This program is free software; you can redistribute it and/or modify it
109       under the same terms as Perl itself.
110
111
112
113perl v5.38.0                      2023-07-20                 Diff::LibXDiff(3)
Impressum