Permalink
Browse files

Remove whitespace [Gun.io WhitespaceBot]

  • Loading branch information...
1 parent c2d8520 commit d7edb6869d0f32472346dffe84caf83033dc855a Gun.io Whitespace Robot committed Oct 21, 2011
Showing with 11 additions and 11 deletions.
  1. +8 −8 lib/LWP/Simple.pm
  2. +1 −1 t/basic-auth.t
  3. +1 −1 t/parse-url.t
  4. +1 −1 t/stringify-headers.t
View
@@ -24,7 +24,7 @@ method has_basic_auth (Str $host) {
if $host ~~ /^ (\w+) \: (\w+) \@ (\N+) $/ {
my $user = $0.Str;
my $pass = $1.Str;
- my $host = $2.Str;
+ my $host = $2.Str;
return $user, $pass, $host;
}
@@ -196,28 +196,28 @@ method getstore (Str $url, Str $filename) {
my $fh = open($filename, :bin, :w);
my $ok = $fh.print($content);
- $fh.close;
+ $fh.close;
return $ok;
}
method parse_url (Str $url) {
my $u = URI.new($url);
my $path = $u.path_query;
-
+
my $user_info = $u.grammar.parse_result<URI_reference><URI><hier_part><authority><userinfo>;
-
+
return (
- $u.scheme,
- $user_info ?? "{$user_info}@{$u.host}" !! $u.host,
- $u.port,
+ $u.scheme,
+ $user_info ?? "{$user_info}@{$u.host}" !! $u.host,
+ $u.port,
$path eq '' ?? '/' !! $path,
$user_info ?? {
host => $u.host,
user => ~ $user_info[0]<likely_userinfo_component>[0],
password => ~ $user_info[0]<likely_userinfo_component>[1]
} !! Nil
- );
+ );
}
method stringify_headers (%headers) {
View
@@ -1,7 +1,7 @@
#
# Test the basic auth code path
#
-
+
use v6;
use Test;
View
@@ -1,7 +1,7 @@
#
# Test the parse_url() method
#
-
+
use v6;
use Test;
@@ -1,7 +1,7 @@
#
# Test the parse_url() method
#
-
+
use v6;
use Test;

0 comments on commit d7edb68

Please sign in to comment.