Improve POD
[text-levenshtein-edlib.git] / lib / Text / Levenshtein / Edlib.pm
index 2948818c84d5708f7be0b20ebd67cd689461d97f..8dd4146aaae4fd42408dcd891e535574f5bd3773 100644 (file)
@@ -67,8 +67,8 @@ sub align {
 }
 
 sub distance {
-       my ($q, $t, $k) = @_;
-       align($q, $t, $k)->{editDistance}
+       my ($q, $t, $k, $mode) = @_;
+       align($q, $t, $k, $mode, EDLIB_TASK_DISTANCE())->{editDistance}
 }
 
 sub to_cigar {
@@ -120,7 +120,7 @@ This module has two functions:
 
 =over
 
-=item B<distance>(I<$query>, I<$target>, [I<$max_distance>])
+=item B<distance>(I<$query>, I<$target>, [I<$max_distance>, [I<$mode>]])
 
 This is the basic interface to the library. It is compatible with the
 function of the same name in L<Text::Levenshtein::XS>.
@@ -128,7 +128,8 @@ function of the same name in L<Text::Levenshtein::XS>.
 It returns the edit distance between the two given strings. If the
 third argument is specified, and the edit distance is greater than the
 value of the third argument, then the function finishes the
-computation early and returns undef.
+computation early and returns undef. See below for the meaning of the
+optional I<$mode> argument.
 
 =item B<align>(I<$query>, I<$target>, [I<$max_distance>, [I<$mode>, [I<$task>]]])
 
@@ -199,20 +200,34 @@ the beginning and C<GAC> at the end of the target are ignored.
 
 =back
 
-The fifth argument, I<$task>, chooses what we want to compute.
-If set to C<EDLIB_TASK_PATH> (default), all the keys described above will be computed.
-If set to C<EDLIB_TASK_LOC>, all keys except for C<alignment> will be computed.
-If set to C<EDLIB_TASK_DISTANCE>, all keys except for C<alignment> and C<startLocations> will be computed.
-The less we compute, the faster the function will run.
+The fifth argument, I<$task>, chooses what we want to compute. The options are:
+
+=over
+
+=item C<EDLIB_TASK_PATH> (default, slowest)
+
+All the keys described above will be computed.
+
+=item C<EDLIB_TASK_LOC>
+
+All keys except for C<alignment> will be computed.
+
+=item C<EDLIB_TASK_DISTANCE> (fastest)
+
+All keys except for C<alignment> and C<startLocations> will be computed.
+
+=back
+
+The less the function computes, the faster it runs.
 
 =back
 
 =head2 EXPORT
 
-All constants by default. You can export the functions C<align> and
-C<distance> and any of the constants below. You can use the tags
-C<:constants> to export every constant, and C<:all> to export every
-constant, C<align> and C<distance>.
+All constants by default. You can export the functions C<align>,
+C<distance> and C<to_cigar> and any of the constants below. You can
+use the tags C<:constants> to export every constant, and C<:all> to
+export every constant, C<align>, C<distance> and C<to_cigar>.
 
 =head2 Exportable constants
 
@@ -233,7 +248,7 @@ constant, C<align> and C<distance>.
 
 =head1 SEE ALSO
 
-L<https://github.com/Martinsos/edlib/>
+L<https://github.com/Martinsos/edlib/>, L<http://martinsosic.com/edlib/edlib_8h.html>
 
 =head1 AUTHOR
 
This page took 0.011157 seconds and 4 git commands to generate.