http://www.perlmonks.org?node_id=1224251


in reply to Re: Runs from Command Line but NOT from Perl
in thread Runs from Command Line but NOT from Perl

Tangent: Has anyone ever written a curl2lwp kind of thing in the vein of s2p and a2p? It would obviously be more verbose, especially in output, but I just realized that I'd like to have it so I can copy curl commands from the dev panel and such and use them to stub out a new LPW/Mech script.

Update: curl2perl really rolls off the tongue…

Replies are listed 'Best First'.
Re^3: Runs from Command Line but NOT from Perl
by Corion (Patriarch) on Nov 14, 2018 at 18:09 UTC
Re^3: Runs from Command Line but NOT from Perl
by Anonymous Monk on Oct 19, 2018 at 01:10 UTC
    You can write curl2perl

      As is often the case, I almost certainly bit off more than I can chew but…

      my $ok = GetOptions( "abstract-unix-socket" => \my $path, "anyauth" => \my $anyauth, "a|append" => \my $append, "basic" => \my $basic, "cacert" => \my $cacert, "capath" => \my $capath, "cert-status" => \my $cert_status, # ...

      …there is a 200 line stub.