On 07/28/2017 02:52 PM, Brandon Allbery wrote:
On Fri, Jul 28, 2017 at 5:49 PM, ToddAndMargo <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote:


                On 07/28/2017 02:41 PM, Brandon Allbery wrote:

    > That's not Perl, it's JSON generated by Perl.

    Mumble, mumble ...  I have a hard enough time learning
    Perl without someone throwing in another language.
    Mumble ...


You're doing web stuff, it's going to get a lot worse before it gets better. JSON, JavaScript, possibly having to deal with web support components in other languages, ....

I am trying to migrate the following from Perl 5 to Perl 6.
I like p5 but I adore P6.

<code>
   $ua = LWP::UserAgent->new;
   $ua->timeout ( MaxTime1 );
   $ua->show_progress ( 1 );   # 0 = do not show; 1 = show
   $response = $ua->get(
        $Url,
        ':content_file' => "$FileName",
        'Cookie'        => "$Cookies",
        'Referer'       => "$Referer",
        'User-Agent'    => "$UserAgent",
        'Host'          => "$Host"
        );

   if ( ! $response->is_success )
      { $PageStatus = DOWNLOAD_FAIL;
        print STDERR BOLD RED
           "   ERROR ${Caller}.GetWebPage: unable to read ",
               $Url, RESET, "\n";
        print STDERR BOLD RED Dumper($response), RESET, "\n";
        return DOWNLOAD_FAIL;
      }

   return $PageStatus;
</code>

Reply via email to