![]() |
![]()
| ![]() |
![]()
NAMEText::Diff3::Text - line number scheme free text buffer VERSION0.08 SYNOPSISuse Text::Diff3; my $f = Text::Diff3::Factory->new; my $t0 = $f->create_text([ map{chomp;$_} <F0> ]); # do not dup internally. my $t1 = $f->create_text($string); # make array references. # follows four take same output. print $_, "\n" for @{$t0->text}; print $t0->as_string_at($_) for $t0->range; print $t0->as_string_range($t0->ragne); print $t0->as_string_at($_) for $t0->first_index .. $t0->last_index; print $t0->as_string_range($t0->first_index .. $t0->last_index); for ($t0->first_index .. $t0->last_index) { my $line = $t0->at($_); print $line, "\n" if defined($line); } # string compare if ($t0->eq_at($i, $string)) { .... } # get string size my $length = $t0->size; DESCRIPTIONThis is a wrapper for a Perl's array reference, improving line number scheme free and limiting fetching from last element by minus index. Normally line number starts 1 in compatible with diff command tools. But you can change it another value like as 0 override first index methods.
COMPATIBILITYUse 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. AUTHORMIZUTANI Tociyuki "<tociyuki@gmail.com>". LICENSE AND COPYRIGHTCopyright (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.
|