line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Crumbr::Default::URI; |
2
|
|
|
|
|
|
|
$Data::Crumbr::Default::URI::VERSION = '0.1.0'; |
3
|
|
|
|
|
|
|
# ABSTRACT: "JSON" profile for Data::Crumbr::Default |
4
|
4
|
|
|
4
|
|
2420
|
use Data::Crumbr::Util; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
331
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub profile { |
7
|
3
|
|
|
3
|
1
|
10
|
my $json_encoder = Data::Crumbr::Util::json_leaf_encoder(); |
8
|
3
|
|
|
|
|
10
|
my $uri_encoder = Data::Crumbr::Util::uri_encoder(); |
9
|
|
|
|
|
|
|
return { |
10
|
3
|
|
|
|
|
84
|
array_open => '', |
11
|
|
|
|
|
|
|
array_close => '', |
12
|
|
|
|
|
|
|
array_key_prefix => '', |
13
|
|
|
|
|
|
|
array_key_suffix => '', |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
hash_open => '', |
16
|
|
|
|
|
|
|
hash_close => '', |
17
|
|
|
|
|
|
|
hash_key_prefix => '', |
18
|
|
|
|
|
|
|
hash_key_suffix => '', |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
keys_separator => '/', |
21
|
|
|
|
|
|
|
value_separator => ' ', |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
array_key_encoder => $uri_encoder, |
24
|
|
|
|
|
|
|
hash_key_encoder => $uri_encoder, |
25
|
|
|
|
|
|
|
value_encoder => $json_encoder, |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
} ## end sub profile |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=pod |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=encoding utf-8 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Data::Crumbr::Default::URI - "JSON" profile for Data::Crumbr::Default |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 VERSION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
version 0.1.0 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Profile for URI encoder |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 INTERFACE |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=over |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item B<< profile >> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $profile = Data::Crumbr::Default::URI->profile(); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
returns a default profile, i.e. encoder data to be used to instantiate a |
58
|
|
|
|
|
|
|
Data::Crumbr::Default encoder. See L</Data::Crumbr> for details about |
59
|
|
|
|
|
|
|
this profile. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=back |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Flavio Poletti <polettix@cpan.org> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright (C) 2015 by Flavio Poletti <polettix@cpan.org> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This module is free software. You can redistribute it and/or |
72
|
|
|
|
|
|
|
modify it under the terms of the Artistic License 2.0. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
75
|
|
|
|
|
|
|
but without any warranty; without even the implied warranty of |
76
|
|
|
|
|
|
|
merchantability or fitness for a particular purpose. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |