projects
/
catagits/Catalyst-Plugin-Session.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Session, fixed bug in algorithm detection, it was always choosing SHA-256
[catagits/Catalyst-Plugin-Session.git]
/
lib
/
Catalyst
/
Plugin
/
Session.pm
diff --git
a/lib/Catalyst/Plugin/Session.pm
b/lib/Catalyst/Plugin/Session.pm
index
32dee9d
..
ae79a8e
100644
(file)
--- a/
lib/Catalyst/Plugin/Session.pm
+++ b/
lib/Catalyst/Plugin/Session.pm
@@
-290,10
+290,12
@@
sub _find_digest () {
unless ($usable) {
foreach my $alg (qw/SHA-1 MD5 SHA-256/) {
eval {
- my $obj = Digest->new($alg);
- $usable = $alg;
- return $obj;
+ Digest->new($alg);
};
+ unless ($@) {
+ $usable = $alg;
+ last;
+ }
}
$usable
or Catalyst::Exception->throw(