Permalink
Browse files

Updated examples/simple.p6 to use Net::Curl or so they say...

  • Loading branch information...
1 parent d83d8ff commit 4d3237d32ffbab3017c886cf2659b9574ce4e145 @azawawi committed Nov 17, 2012
Showing with 5 additions and 6 deletions.
  1. +5 −6 examples/simple.p6
View
@@ -1,17 +1,16 @@
#!/usr/bin/env perl6
use v6;
+BEGIN { @*INC.push('lib') };
+
use Net::Curl;
-my $curl;
-my $res;
-
-$curl = curl_easy_init;
+my $curl = curl_easy_init;
if $curl {
- curl_easy_setopt($curl, CURLOPT_URL, "http://example.com");
+ curl_easy_setopt($curl, CURLOPT_URL, 'http://example.com');
# Perform the request, res will get the return code
- $res = curl_easy_perform($curl);
+ my $res = curl_easy_perform($curl);
# Check for errors
if $res != CURLE_OK {

0 comments on commit 4d3237d

Please sign in to comment.