Permalink
Browse files

simplify object construction a bit

  • Loading branch information...
1 parent 86764bc commit b1ba03bbb3a0f8dde834704a822da46c703434c5 @moritz moritz committed Mar 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/URI.pm
View
@@ -128,7 +128,7 @@ method new(Str $uri_pos1?, Str :$uri, :$is_validating) {
die "Please specify the uri by name or position but not both.";
}
elsif $uri.defined or $uri_pos1.defined {
- $obj.parse($uri.defined ?? $uri !! $uri_pos1);
+ $obj.parse($uri // $uri_pos1);
}
return $obj;

0 comments on commit b1ba03b

Please sign in to comment.