Algorithm-Diff-Apply

 view release on metacpan or  search on metacpan

lib/Algorithm/Diff/Apply.pod  view on Meta::CPAN

		/Book/     and return $arg->isbn();
		/Product/  and return $arg->serial_number();
		/UKPerson/ and return $arg->nat_ins_number();
		/Person/   and return $arg->uid();
		# ... fallback case ...
		return "$arg";    # stringify: always unique
	},
	#...

Remember that A::D::Apply only uses this type of callback when trying
to optimise away or reduce conflicting hunks. That's why the "singular
form" C<apply_diff()> doesn't take this option.

=head1 DIFF LABELS

C<apply_diffs()> makes you uniquely label the diffs you're applying
when merging and applying them together, in the hope that when a
conflict occurs, a meaningful name can be associated with each source
of changes.

A diff label should reflect where the change came from, and can be
anything you like: a revision number, a URL, a filename, or just a
unique number. C<Algorithm::Diff::Apply> doesn't care about the exact
syntax of the tag names you use - any unique string will do.

This convention is also used by the callback routines whose interfaces
are described in L<CALLBACK INTERFACES> above.

=head1 TO-DO

The calling convention for options is ugly and confusing, and defeats
prototyping. It's done like that to correspond with other modules in
the I<Algorithm::{Diff,Patch}> family, but alternative syntaxes should
probably be permitted.

Add more conflict optimisers. If anyone out there has a good routine,
and would like to see it added to the library, then I'd be happy to
incorporate it.

=head1 SEE ALSO

=over 4

=item Tracking:

You can report bugs in this module at
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Algorithm-Diff-Apply>, or to the
author directly via email.

=item Other Perl modules:

L<Algorithm::Diff>, of course. Other modules that do similar things to
C<Algorithm::Diff::Apply>: L<Algorithm::Merge>, L<VCS::Lite>.

=item Papers, software, and discussions:

[1] Automated Merging of Software Modifications, R. E. Mullen, CISL
Cambridge, Honeywell Software Productivity Symposium, Minneapolis MN,
April 1977: L<http://www.multicians.org/mullen-paper.html>.

Codeville: L<http://bitconjurer.org/codeville/>.

darcs: L<http://www.abridgegame.org/darcs/>.

Monotone: L<http://www.venge.net/monotone/>.

Interesting information for anyone building a full VCS:
L<http://kt.zork.net/kernel-traffic/kt20030323_210.html#1>.

=back

=head1 AUTHOR

Andrew Chadwick, I<andrewc-algodiffaply@piffle.org>.

=head1 LICENCE

Copyright (c) 2003 Andrew Chadwick. This program is free software; you may
copy it, redistribute it, or modify it under the same terms as Perl itself.

=cut



( run in 1.673 second using v1.01-cache-2.11-cpan-df04353d9ac )