Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix boolean type was true even when "false"

  • Loading branch information...
commit 55ef0065ab0d9ef41ac76036b99f38fe82835faa 1 parent f6139a3
@jhthorsen jhthorsen authored
Showing with 5 additions and 1 deletion.
  1. +4 −0 Changes
  2. +1 −1  lib/Transmission/Types.pm
View
4 Changes
@@ -1,5 +1,9 @@
Revision history for Transmission-Client
+0.04
+ - Fix boolean type was true even when "false"
+ -
+
0.03 Mon Apr 26 21:54:28 CEST 2010
- Change read_all() returns fetched data in a hash
- Add example script
View
2  lib/Transmission/Types.pm
@@ -35,7 +35,7 @@ coerce double, from Any, via { -1 };
subtype string, as Str;
coerce string, from Any, via { defined $_ ? "$_" : "__UNDEF__" };
-subtype boolean, as Bool;
+type boolean, where { defined $_ and $_ =~ /^(1|0)$/ };
coerce boolean, from Object, via { int $_ };
subtype array, as ArrayRef;
Please sign in to comment.
Something went wrong with that request. Please try again.