summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorFuji, Goro <gfuji@cpan.org>2010-10-05 15:55:38 +0900
committerFuji, Goro <gfuji@cpan.org>2010-10-05 15:55:38 +0900
commit9346908485b30df552df6b5bc18337449347c471 (patch)
tree3215f54d9bab57827a56eee06be37ed041124fd9 /perl
parentb3a7ba14f784e96c3c07160840f692815cea4e29 (diff)
downloadmsgpack-python-9346908485b30df552df6b5bc18337449347c471.tar.gz
perl: remove tricky hacks
Diffstat (limited to 'perl')
-rw-r--r--perl/lib/Data/MessagePack.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/perl/lib/Data/MessagePack.pm b/perl/lib/Data/MessagePack.pm
index 1fccbf7..7d1bda7 100644
--- a/perl/lib/Data/MessagePack.pm
+++ b/perl/lib/Data/MessagePack.pm
@@ -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