Text::Diff3::Range3 - three-way difference container
use Text::Diff3;
my $f = Text::Diff3::Factory;
my $range3 = $f->create_range3(1, 2,3, 4,5, 6,7);
$type = $range3->type; # 1
$line_no = $range3->lo0; # 2
$line_no = $range3->hi0; # 3
$line_no = $range3->lo1; # 4
$line_no = $range3->hi1; # 5
$line_no = $range3->lo2; # 6
$line_no = $range3->hi2; # 7
print $range3->as_string, "\n"; # 1 2,3 4,5 6,7
This module provides you to handle trhee way difference sets.
- "$r->as_string"
- Returns values as string like as '1 2,3 4,5 6,7'.
- "$r->as_array"
- Returns values as array (type lo0 hi0 lo1 hi1 lo2 hi2).
- "$r->type"
- Has one of types of range. 0: change text 0, 1: change text 1, 2: change
text 2, A: conflict.
- "$r->lo0"
- Has a low line number of range in text 0.
- "$r->hi0"
- Has a hi line number of range in text 0.
- "$r->range0"
- Returns ($r->lo0 .. $r->hi0).
- "$r->lo1"
- Has a low line number of range in text 1.
- "$r->hi1"
- Has a hi line number of range in text 1.
- "$r->range1"
- Returns ($r->lo1 .. $r->hi1).
- "$r->lo2"
- Has a low line number of range in text 2.
- "$r->hi2"
- Has a hi line number of range in text 2.
- "$r->range2"
- Returns ($r->lo2 .. $r->hi2).
- "$r->set_type($c)"
- Sets type.
- "$r->set_type_diff0"
- Lets type 0: change text 0.
- "$r->set_type_diff1"
- Lets type 1: change text 1.
- "$r->set_type_diff2"
- Lets type 2: change text 2.
- "$r->set_type_diffA"
- Lets type A: conflict.
- "$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>".
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.