The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Text::Diff3::Range2 - two way difference container

VERSION

0.08

SYNOPSIS

    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

DESCRIPTION

This module provides you to handle two way difference sets.

METHODS

$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.

COMPATIBILITY

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.

AUTHOR

MIZUTANI Tociyuki <tociyuki@gmail.com>.

LICENSE AND COPYRIGHT

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.