File Coverage

blib/lib/Text/JaroWinkler.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition 4 4 100.0
subroutine 4 4 100.0
pod 0 1 0.0
total 23 24 95.8


line stmt bran cond sub pod time code
1             package Text::JaroWinkler;
2              
3 1     1   6856 use 5.006;
  1         4  
  1         45  
4 1     1   6 use warnings;
  1         2  
  1         39  
5 1     1   6 use strict;
  1         1  
  1         362  
6              
7             require Exporter;
8             require DynaLoader;
9              
10             our @ISA = qw(Exporter DynaLoader);
11              
12             # Items to export into callers namespace by default. Note: do not export
13             # names by default without a very good reason. Use EXPORT_OK instead.
14             # Do not simply export all your public functions/methods/constants.
15             # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
16             # will save memory.
17             our %EXPORT_TAGS = ( 'all' => [ qw(
18             strcmp95
19             do_strcmp95
20             ) ] );
21              
22             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
23              
24             our @EXPORT = qw();
25              
26             our $VERSION = '0.1';
27              
28             bootstrap Text::JaroWinkler $VERSION;
29              
30             # Preloaded methods go here.
31              
32             sub strcmp95 {
33 15     15 0 131 my($ying, $yang, $y_length, %opt) = @_;
34 15         53 $ying = sprintf("%*.*s", -$y_length, $y_length, $ying);
35 15         32 $yang = sprintf("%*.*s", -$y_length, $y_length, $yang);
36              
37 15   100     66 my $high_prob = $opt{HIGH_PROB} || 0;
38 15   100     56 my $toupper = $opt{TOUPPER} || 0;
39 15         2126 do_strcmp95($ying, $yang, $y_length, $high_prob, $toupper);
40             }
41              
42             1;
43             __END__