projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
try to fix unblessed refs in PC34s
[spider.git]
/
perl
/
DXUser.pm
diff --git
a/perl/DXUser.pm
b/perl/DXUser.pm
index 94fa3d1a9ff1549fe2659b69444fef2915c565a9..419086adaa1230ef09e55772dc7fc17f625195f0 100644
(file)
--- a/
perl/DXUser.pm
+++ b/
perl/DXUser.pm
@@
-249,10
+249,11
@@
sub get
unless ($dbm->get($call, $data)) {
$ref = decode($data);
if ($ref) {
unless ($dbm->get($call, $data)) {
$ref = decode($data);
if ($ref) {
- if (
ref $ref ne 'DXUser'
) {
+ if (
UNIVERSAL::isa($ref, 'DXUser')
) {
dbg("DXUser::get: got strange answer from decode ". ref $ref. " ignoring");
return undef;
}
dbg("DXUser::get: got strange answer from decode ". ref $ref. " ignoring");
return undef;
}
+ # we have a reference and it *is* a DXUser
} else {
dbg("DXUser::get: no reference returned from decode $!");
return undef;
} else {
dbg("DXUser::get: no reference returned from decode $!");
return undef;
@@
-278,7
+279,7
@@
sub get_current
my $dxchan = DXChannel::get($call);
if ($dxchan) {
my $ref = $dxchan->user;
my $dxchan = DXChannel::get($call);
if ($dxchan) {
my $ref = $dxchan->user;
- return $ref if
ref $ref eq 'DXUser'
;
+ return $ref if
$ref && UNIVERSAL::isa($ref, 'DXUser')
;
dbg("DXUser::get_current: got invalid user ref from dxchan $dxchan->{call} ". ref $ref. " ignoring");
}
dbg("DXUser::get_current: got invalid user ref from dxchan $dxchan->{call} ". ref $ref. " ignoring");
}