projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix OO-style subscription
[blerg.git]
/
lib
/
perl
/
Blerg-Database
/
lib
/
Blerg
/
Database.pm
diff --git
a/lib/perl/Blerg-Database/lib/Blerg/Database.pm
b/lib/perl/Blerg-Database/lib/Blerg/Database.pm
index
823dc6a
..
b05c7f9
100644
(file)
--- a/
lib/perl/Blerg-Database/lib/Blerg/Database.pm
+++ b/
lib/perl/Blerg-Database/lib/Blerg/Database.pm
@@
-85,7
+85,10
@@
sub _ensure_pointer {
sub close {
my ($obj) = @_;
sub close {
my ($obj) = @_;
- $obj->_ensure_pointer;
+ if (!(defined $obj && defined $obj->{ptr})) {
+ # Welp, nothing to do here!
+ return;
+ }
Blerg::Database::_close($obj->{ptr});
delete $obj->{ptr};
}
Blerg::Database::_close($obj->{ptr});
delete $obj->{ptr};
}
@@
-115,7
+118,8
@@
sub get_subscription_mark {
sub subscription_list {
my ($obj) = @_;
sub subscription_list {
my ($obj) = @_;
- return Blerg::Database::subscription_list($obj->{name});
+ $obj->_ensure_pointer;
+ return Blerg::Database::_subscription_list($obj->{name}, 0, 1);
}
sub mute {
}
sub mute {