Text::Diff3::Range2 - two way difference container
0.08
use Text::Diff3; my $f = Text::Diff3::Factory; my $range2 = $f->create_range2('c', 100,102, 104,110); $type = $range2->type; # 'c' $line_no = $range2->loA; # 100 $line_no = $range2->hiA; # 102 $line_no = $range2->loB; # 104 $line_no = $range2->hiB; # 110 print $range2->as_string, "\n"; # 100,102c104,110
This module provides you to handle two way difference sets.
$r->as_string
Returns values as string like as '100,102c104,110'.
$r->as_array
Returns values as array (type, loA, hiA, loB, hiB).
$r->type
Has one of types of range. c: change, a: append, d: delete.
$r->loA
Has a low line number of range in text A.
$r->hiA
Has a hi line number of range in text A.
$r->rangeA
Returns ($r->loA .. $r->hiA).
$r->loB
Has a low line number of range in text B.
$r->hiB
Has a hi line number of range in text B.
$r->rangeB
Returns ($r->loB .. $r->hiB).
$r->set_type($c)
Sets type.
$r->set_type_a
Lets type a: append.
$r->set_type_c
Lets type c: change.
$r->set_type_d
Lets type d: delete.
$r->initialize
Initializes the instance.
Use new function style interfaces introduced from version 0.08. This module remained for backward compatibility before version 0.07. This module is no longer maintenance after version 0.08.
MIZUTANI Tociyuki <tociyuki@gmail.com>.
<tociyuki@gmail.com>
Copyright (C) 2010 MIZUTANI Tociyuki
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
To install Text::Diff3, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Diff3
CPAN shell
perl -MCPAN -e shell install Text::Diff3
For more information on module installation, please visit the detailed CPAN module installation guide.