| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WWW::Form::UrlEncoded; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 4 |  |  | 4 |  | 41268 | use 5.008001; | 
|  | 4 |  |  |  |  | 10 |  | 
| 4 | 4 |  |  | 4 |  | 14 | use strict; | 
|  | 4 |  |  |  |  | 4 |  | 
|  | 4 |  |  |  |  | 65 |  | 
| 5 | 4 |  |  | 4 |  | 11 | use warnings; | 
|  | 4 |  |  |  |  | 9 |  | 
|  | 4 |  |  |  |  | 571 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | BEGIN { | 
| 8 | 4 |  |  | 4 |  | 6 | our $VERSION = "0.24"; | 
| 9 | 4 |  |  |  |  | 7 | our @EXPORT_OK = qw/parse_urlencoded parse_urlencoded_arrayref build_urlencoded build_urlencoded_utf8/; | 
| 10 |  |  |  |  |  |  |  | 
| 11 | 4 |  |  |  |  | 6 | my $use_pp = $ENV{WWW_FORM_URLENCODED_PP}; | 
| 12 |  |  |  |  |  |  |  | 
| 13 | 4 | 50 |  |  |  | 14 | if (!$use_pp) { | 
| 14 | 4 |  |  |  |  | 5 | eval { | 
| 15 | 4 |  |  |  |  | 910 | require WWW::Form::UrlEncoded::XS; | 
| 16 | 0 | 0 |  |  |  | 0 | if ( $WWW::Form::UrlEncoded::XS::VERSION < $VERSION ) { | 
| 17 | 0 |  |  |  |  | 0 | warn "WWW::Form::UrlEncoded::XS $VERSION is require. fallback to PP version"; | 
| 18 | 0 |  |  |  |  | 0 | die; | 
| 19 |  |  |  |  |  |  | } | 
| 20 |  |  |  |  |  |  | }; | 
| 21 | 4 |  |  |  |  | 16 | $use_pp = !!$@; | 
| 22 |  |  |  |  |  |  | } | 
| 23 |  |  |  |  |  |  |  | 
| 24 | 4 | 50 |  |  |  | 13 | if ($use_pp) { | 
| 25 | 4 |  |  |  |  | 1407 | require WWW::Form::UrlEncoded::PP; | 
| 26 | 4 |  |  |  |  | 231 | WWW::Form::UrlEncoded::PP->import(@EXPORT_OK); | 
| 27 |  |  |  |  |  |  | } | 
| 28 |  |  |  |  |  |  | else { | 
| 29 | 0 |  |  |  |  | 0 | WWW::Form::UrlEncoded::XS->import(@EXPORT_OK); | 
| 30 |  |  |  |  |  |  | } | 
| 31 |  |  |  |  |  |  |  | 
| 32 | 4 |  |  |  |  | 19 | require Exporter; | 
| 33 | 4 |  |  |  |  | 108 | *import = \&Exporter::import; | 
| 34 |  |  |  |  |  |  | } | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | 1; | 
| 37 |  |  |  |  |  |  | __END__ |