line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Email::Address::UseXS; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
79529
|
use strict; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
64
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
192
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.000'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Email::Address::UseXS - ensure that any code uses L instead of L |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
To use, simply add C |
15
|
|
|
|
|
|
|
anything that tries to load in L. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
use Email::Address::UseXS; |
18
|
|
|
|
|
|
|
print Email::Address->parse('user@example.com'); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 WHY? |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
L is dangerous, badly-formed input can cause very slow regex expressions (taking minutes or more to run). |
23
|
|
|
|
|
|
|
See L for details. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
BEGIN { |
28
|
2
|
100
|
|
2
|
|
59
|
die 'Must load ' . __PACKAGE__ . ' before Email::Address' |
29
|
|
|
|
|
|
|
if Email::Address->can('parse'); |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
402
|
require Email::Address::XS; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
3773
|
@Email::Address::ISA = 'Email::Address::XS'; |
34
|
1
|
|
|
|
|
27
|
$INC{'Email/Address.pm'} = 1; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |