OSDN Git Service
(root)
/
newslash
/
newslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02d5fde
)
Model::Cowrapper: last_error() and last_errorno() can receive argument
author
hylom
<hylom@users.sourceforge.jp>
Wed, 7 Nov 2018 10:28:20 +0000
(19:28 +0900)
committer
hylom
<hylom@users.sourceforge.jp>
Wed, 7 Nov 2018 10:28:20 +0000
(19:28 +0900)
src/newslash_web/lib/Newslash/Model/Cowrapper.pm
patch
|
blob
|
history
diff --git
a/src/newslash_web/lib/Newslash/Model/Cowrapper.pm
b/src/newslash_web/lib/Newslash/Model/Cowrapper.pm
index
480b022
..
1e20bda
100644
(file)
--- a/
src/newslash_web/lib/Newslash/Model/Cowrapper.pm
+++ b/
src/newslash_web/lib/Newslash/Model/Cowrapper.pm
@@
-263,12
+263,14
@@
sub set_errorno {
}
sub last_error {
- my $self = shift;
+ my ($self, $err) = $@;
+ $self->{_error} = $err if defined $err;
return $self->{_error};
}
sub last_errorno {
- my $self = shift;
+ my ($self, $errno) = $@;
+ $self->{_errorno} = $errno if defined $errno;
return $self->{_errorno};
}