mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
perl: remove tricky hacks
This commit is contained in:
parent
b3a7ba14f7
commit
9346908485
1 changed files with 2 additions and 6 deletions
|
|
@ -9,17 +9,13 @@ our $PreferInteger = 0;
|
|||
sub true () {
|
||||
require Data::MessagePack::Boolean;
|
||||
no warnings 'once', 'redefine';
|
||||
my $t = $Data::MessagePack::Boolean::true;
|
||||
*true = sub (){ $t };
|
||||
return $t;
|
||||
return $Data::MessagePack::Boolean::true;
|
||||
}
|
||||
|
||||
sub false () {
|
||||
require Data::MessagePack::Boolean;
|
||||
no warnings 'once', 'redefine';
|
||||
my $f = $Data::MessagePack::Boolean::false;
|
||||
*false = sub (){ $f };
|
||||
return $f;
|
||||
return $Data::MessagePack::Boolean::false;
|
||||
}
|
||||
|
||||
if ( !__PACKAGE__->can('pack') ) { # this idea comes from Text::Xslate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue