Debian Codegraph @

lib/JSON/backportPP/Boolean.pm

raw
1 package # This is JSON::backportPP
2 JSON::PP::Boolean;
3
4 use strict;
5 require overload;
6 local $^W;
7 overload::unimport('overload', qw(0+ ++ -- fallback));
8 overload::import('overload',
9 "0+" => sub { ${$_[0]} },
10 "++" => sub { $_[0] = ${$_[0]} + 1 },
11 "--" => sub { $_[0] = ${$_[0]} - 1 },
12 fallback => 1,
13 );
14
15 $JSON::backportPP::Boolean::VERSION = '4.12';
16
17 1;
18
19 __END__
20
21 =head1 NAME
22
23 JSON::PP::Boolean - dummy module providing JSON::PP::Boolean
24
25 =head1 SYNOPSIS
26
27 # do not "use" yourself
28
29 =head1 DESCRIPTION
30
31 This module exists only to provide overload resolution for Storable and similar modules. See
32 L<JSON::PP> for more info about this class.
33
34 =head1 AUTHOR
35
36 This idea is from L<JSON::XS::Boolean> written by Marc Lehmann <schmorp[at]schmorp.de>
37
38 =head1 LICENSE
39
40 This library is free software; you can redistribute it and/or modify
41 it under the same terms as Perl itself.
42
43 =cut
44