line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::Create::Bool; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
58675
|
use warnings; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
168
|
|
4
|
4
|
|
|
4
|
|
26
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
523
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ISA = qw!Exporter!; |
7
|
|
|
|
|
|
|
our @EXPORT = qw!true false!; |
8
|
|
|
|
|
|
|
our $VERSION = '0.34_01'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $t = 1; |
11
|
|
|
|
|
|
|
my $f = 0; |
12
|
|
|
|
|
|
|
my $true = bless \$t, __PACKAGE__; |
13
|
|
|
|
|
|
|
my $false = bless \$f, __PACKAGE__; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub true |
16
|
|
|
|
|
|
|
{ |
17
|
4
|
|
|
4
|
0
|
341
|
return $true; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub false |
21
|
|
|
|
|
|
|
{ |
22
|
4
|
|
|
4
|
0
|
1757
|
return $false; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=encoding UTF-8 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
JSON::Create::Bool - booleans for JSON::Create |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use JSON::Create::Bool; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my %thing = (yes => true, no => false); |
38
|
|
|
|
|
|
|
print json_create (\%thing); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This module provides substitute booleans for JSON::Create. These |
43
|
|
|
|
|
|
|
booleans are intended only to be used for generating C and |
44
|
|
|
|
|
|
|
C literals in JSON output. They don't work very well for other |
45
|
|
|
|
|
|
|
purposes. If you want booleans which can be used for general purposes, |
46
|
|
|
|
|
|
|
please try other modules like L. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 EXPORTS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
C and C are exported by default. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|