Permalink
Browse files

Fix compat mode

  • Loading branch information...
mnunberg committed Dec 19, 2012
1 parent 4a94bce commit a38f05534f31ad4140d67d0d11e4c07da9f53ef6
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/Couchbase/Client/Compat.pm
@@ -68,6 +68,8 @@ sub return_for_op {
sub new {
my ($cls,$options) = @_;
my $o = $cls->SUPER::new($options);
+ bless $o, $cls;
+ return $o;
}
@@ -79,15 +81,15 @@ foreach my $sub (qw(
no strict 'refs';
*{$sub} = sub {
my $self = shift;
- my $ret = $self->{\"SUPER::$sub"}(@_);
+ my $ret = $self->${\"SUPER::$sub"}(@_);
$ret = return_for_op($ret, $sub);
return $ret;
};
my $multi = "$sub\_multi";
*{$multi} = sub {
my $self = shift;
- my $ret = $self->{\"SUPER::$multi"}(@_);
+ my $ret = $self->${\"SUPER::$multi"}(@_);
return return_for_multi_wrap(\@_, $ret, $sub)
};
}
@@ -149,4 +151,4 @@ L<Cache::Memcached::libmemcached>
Copyright (C) 2012 M. Nunberg
You may use and distribute this software under the same terms, licensing, and
-conditions as perl itself.
+conditions as perl itself.

0 comments on commit a38f055

Please sign in to comment.