Skip to content

Instantly share code, notes, and snippets.

@jadeallenx
Created February 20, 2010 04:05
Show Gist options
  • Save jadeallenx/309497 to your computer and use it in GitHub Desktop.
Save jadeallenx/309497 to your computer and use it in GitHub Desktop.
--- 03_persistence-t.org Fri Feb 19 21:47:21 2010
+++ 03_persistence.t Fri Feb 19 21:50:49 2010
@@ -13,7 +13,12 @@
foreach my $client qw(one two three) {
my $ua = LWP::UserAgent->new;
- $ua->cookie_jar({ file => "$ENV{HOME}/.cookies.txt" });
+ if ( $^O eq "MSWin32" ) {
+ $ua->cookie_jar({ file => "$ENV{TEMP}/.cookies.txt" });
+ }
+ else {
+ $ua->cookie_jar({ file => "$ENV{HOME}/.cookies.txt" });
+ }
my $res = $ua->get("http://127.0.0.1:$port/cookies");
like $res->content, qr/\$VAR1 = \{\}/,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment