1package JSON::PP5005;
2
3use 5.005;
4use strict;
5
6my @properties;
7
8$JSON::PP5005::VERSION = '0.06';
9
10BEGIN {
11    *JSON::PP::JSON_encode_ascii   = *_encode_ascii;
12    *JSON::PP::JSON_encode_latin1  = *_encode_latin1;
13    *JSON::PP::JSON_decode_unicode = *_disable_decode_unicode;
14
15    sub utf8::is_utf8 {
16        1; # It is considered that UTF8 flag on for Perl 5.005.
17    }
18
19    sub utf8::encode (\$) {
20    }
21
22    sub utf8::decode (\$) {
23    }
24
25    sub JSON::PP::ascii {
26        warn "ascii() is disable in Perl5.005.";
27        $_[0]->{ascii} = 0; $_[0];
28    }
29
30    sub JSON::PP::latin1 {
31        warn "latin1() is disable in Perl5.005.";
32        $_[0]->{latin1} = 0; $_[0];
33    }
34
35    # missing in B module.
36    sub B::SVf_IOK () { 0x00010000; }
37    sub B::SVf_NOK () { 0x00020000; }
38    sub B::SVf_POK () { 0x00040000; }
39    sub B::SVp_IOK () { 0x01000000; }
40    sub B::SVp_NOK () { 0x02000000; }
41
42}
43
44
45sub _encode_ascii {
46    # currently noop
47}
48
49
50sub _encode_latin1 {
51    # currently noop
52}
53
54
55sub _disable_decode_unicode { chr(hex($_[0])); }
56
57
58
591;
60__END__
61
62=pod
63
64=head1 NAME
65
66JSON::PP5005 - Helper module in using JSON::PP in Perl 5.005
67
68=head1 DESCRIPTION
69
70JSON::PP calls internally.
71
72=head1 AUTHOR
73
74Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>
75
76
77=head1 COPYRIGHT AND LICENSE
78
79Copyright 2007 by Makamaka Hannyaharamitu
80
81This library is free software; you can redistribute it and/or modify
82it under the same terms as Perl itself.
83
84=cut
85
86