File Coverage

blib/lib/JSON/Schema/Null.pm
Criterion Covered Total %
statement 12 13 92.3
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 2 0.0
total 17 21 80.9


line stmt bran cond sub pod time code
1             package JSON::Schema::Null;
2              
3 9     9   153 use 5.010;
  9         39  
4 9     9   40 use strict;
  9         14  
  9         359  
5 9     9   39 use overload '""' => sub { return '' };
  9     15   15  
  9         71  
  15         65  
6              
7             our $AUTHORITY = 'cpan:TOBYINK';
8             our $VERSION = '0.016';
9              
10             sub new
11             {
12 9     9 0 11 my ($class) = @_;
13 9         14 my $x = '';
14 9         26 return bless \$x, $class;
15             }
16              
17             sub TO_JSON
18             {
19 0     0 0   return undef;
20             }
21              
22             1;
23              
24             __END__
25              
26             =head1 NAME
27              
28             JSON::Schema::Null - represents JSON's null value
29              
30             =head1 SEE ALSO
31              
32             L<JSON::Schema>.
33              
34             =head1 AUTHOR
35              
36             Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
37              
38             =head1 COPYRIGHT AND LICENCE
39              
40             Copyright 2010-2012 Toby Inkster.
41              
42             This module is tri-licensed. It is available under the X11 (a.k.a. MIT)
43             licence; you can also redistribute it and/or modify it under the same
44             terms as Perl itself.
45              
46             =head2 a.k.a. "The MIT Licence"
47              
48             Permission is hereby granted, free of charge, to any person obtaining a copy
49             of this software and associated documentation files (the "Software"), to deal
50             in the Software without restriction, including without limitation the rights
51             to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52             copies of the Software, and to permit persons to whom the Software is
53             furnished to do so, subject to the following conditions:
54              
55             The above copyright notice and this permission notice shall be included in
56             all copies or substantial portions of the Software.
57              
58             THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59             IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60             FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61             AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62             LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63             OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64             THE SOFTWARE.
65              
66             =cut