| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Email::Address::Loose; | 
| 2 | 11 |  |  | 11 |  | 52822 | use strict; | 
|  | 11 |  |  |  |  | 21 |  | 
|  | 11 |  |  |  |  | 389 |  | 
| 3 | 11 |  |  | 11 |  | 56 | use warnings; | 
|  | 11 |  |  |  |  | 18 |  | 
|  | 11 |  |  |  |  | 477 |  | 
| 4 |  |  |  |  |  |  | our $VERSION = '0.10'; | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 11 |  |  | 11 |  | 56 | use base 'Email::Address::Loose::EmailAddress'; | 
|  | 11 |  |  |  |  | 24 |  | 
|  | 11 |  |  |  |  | 7854 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | sub import { | 
| 9 | 11 |  |  | 11 |  | 123 | my ($class, @args) = @_; | 
| 10 | 11 | 100 |  |  |  | 3750 | if (grep { $_ eq '-override' } @args) { | 
|  | 8 |  |  |  |  | 57 |  | 
| 11 | 8 |  |  |  |  | 31 | $class->globally_override; | 
| 12 |  |  |  |  |  |  | } | 
| 13 |  |  |  |  |  |  | } | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | my $Email_Address_parse; | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | sub globally_override { | 
| 18 | 9 |  |  | 9 | 1 | 710 | my $class = shift; | 
| 19 |  |  |  |  |  |  |  | 
| 20 | 11 |  |  | 11 |  | 118 | no warnings 'redefine'; | 
|  | 11 |  |  |  |  | 18 |  | 
|  | 11 |  |  |  |  | 1136 |  | 
| 21 | 9 | 50 |  |  |  | 38 | unless ($Email_Address_parse) { | 
| 22 | 9 |  |  |  |  | 27 | $Email_Address_parse = \&Email::Address::parse; | 
| 23 | 9 |  |  |  |  | 70 | *Email::Address::parse = \&Email::Address::Loose::EmailAddress::parse; | 
| 24 |  |  |  |  |  |  | } | 
| 25 |  |  |  |  |  |  |  | 
| 26 | 9 |  |  |  |  | 3656 | 1; | 
| 27 |  |  |  |  |  |  | } | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | sub globally_unoverride { | 
| 30 | 2 |  |  | 2 | 1 | 838 | my $class = shift; | 
| 31 |  |  |  |  |  |  |  | 
| 32 | 11 |  |  | 11 |  | 57 | no warnings 'redefine'; | 
|  | 11 |  |  |  |  | 19 |  | 
|  | 11 |  |  |  |  | 918 |  | 
| 33 | 2 | 50 |  |  |  | 9 | if ($Email_Address_parse) { | 
| 34 | 2 |  |  |  |  | 16 | *Email::Address::parse = $Email_Address_parse; | 
| 35 | 2 |  |  |  |  | 11 | undef $Email_Address_parse; | 
| 36 |  |  |  |  |  |  |  | 
| 37 | 2 |  |  |  |  | 11 | Email::Address->purge_cache; | 
| 38 |  |  |  |  |  |  | } | 
| 39 |  |  |  |  |  |  |  | 
| 40 | 2 |  |  |  |  | 5 | 1; | 
| 41 |  |  |  |  |  |  | } | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | 1; | 
| 44 |  |  |  |  |  |  | __END__ |