line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Symbol::Approx::Sub::String::Equal |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Matcher plugin for Symbol::Approx::Sub; |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Copyright (c) 2000, Magnum Solutions Ltd. All rights reserved. |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# This module is free software; you can redistribute it and/or |
9
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
package Symbol::Approx::Sub::String::Equal; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
require 5.006_000; |
15
|
10
|
|
|
10
|
|
5276
|
use strict; |
|
10
|
|
|
|
|
26
|
|
|
10
|
|
|
|
|
321
|
|
16
|
10
|
|
|
10
|
|
56
|
use warnings; |
|
10
|
|
|
|
|
21
|
|
|
10
|
|
|
|
|
579
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our ($VERSION, @ISA, $AUTOLOAD); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$VERSION = '3.1.1'; |
21
|
|
|
|
|
|
|
|
22
|
10
|
|
|
10
|
|
57
|
use Carp; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
1278
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Symbol::Approx::Sub::String::Equal |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SYNOPSIS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
See L |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 METHODS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 match |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Passed a value and a list of values. Returns the values from the list |
37
|
|
|
|
|
|
|
which equal (by string comparison) the initial value. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub match { |
42
|
12
|
|
|
12
|
1
|
90
|
my ($sub, @subs) = @_; |
43
|
|
|
|
|
|
|
|
44
|
12
|
|
|
|
|
63
|
my @ret = grep { $sub eq $subs[$_] } 0 .. $#subs; |
|
294
|
|
|
|
|
520
|
|
45
|
|
|
|
|
|
|
|
46
|
12
|
|
|
|
|
62
|
return @ret; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |