WWW::Noss::Curl(3)
π WWW::Noss::Curl(3) β the manual, but make it make sense
okay so bestie, this is a User Contributed Perl Documentation page for WWW::Noss::Curl(3), and no cap it's basically a little glamorous go-between for the curl(1) command. she's private, she's busy, she fetches network resources. let's get into it β¨
π¦ NAME
WWW::Noss::Curl β literally an interface to the curl command, periodt.
πΈ USAGE
like this, bestie:
use WWW::Noss::Curl qw(curl);
curl('https://url', 'output');
that's it. that's the whole vibe check.
π DESCRIPTION
WWW::Noss::Curl is a module that hands you an interface to the curl(1) command so you can fetch network resources without crying. this is a private module, okay? so if you're looking for the user-facing docs, go consult the noss manual. iykyk π
β¨ SUBROUTINES β¨
heads up bestie: subroutines are not automatically exported. you gotta ask for them (see the qw(curl) up there π).
π ($rt, \@resp, \%head) = curl($link, $output, [ %param ])
this one's the main character. it curl(1)s your $link and downloads it to $output. %param is an optional hash argument of extra parameters you wanna pass along. π«Ά
it returns:
- the exit code of
curl(1)β a return value of0means success, non-zero means failure π₯ - the return values of
parse_http_header()on the response's header
and if you're sitting there like "what does this number mean π" β curl_error() can describe that return value for you.
π valid fields for the %param hash:
verboseβ boolean, decides whether verbose output is enabled or not. corresponds tocurl(1)'s"--silent"option. defaults tofalse.agentβ string to use as user agent. corresponds tocurl(1)'s"--user-agent"option. defaults to none.time_condβ only download a file if it's been modified past the given time. can be either a timestamp or a file. corresponds tocurl(1)'s"--time-cond"option. defaults to none.remote_timeβ copy the remote file's modification time when downloading a file. corresponds tocurl(1)'s"--remote-time"option. defaults tofalse.etag_saveβ path to the file you wanna write the remote file's etag to, if it has one. corresponds tocurl(1)'s"--etag-save"option. defaults to none.etag_compareβ path to the file to compare the remote file's etag against, only downloading the remote file if the etags differ. corresponds tocurl(1)'s"--etag-compare"option. defaults to none.limit_rateβ the download rate to limitcurl(1)to. corresponds tocurl(1)'s"--limit-rate"option. defaults to none.user_agentβ the user agent string to send to the server. corresponds tocurl(1)'s"--user-agent"option. defaults to none.timeoutβ maximum time in seconds a transfer is allowed to take. corresponds tocurl(1)'s"--max-time"option. defaults to no timeout.failβ boolean, decides ifcurl(1)should fail with no output on server errors. corresponds tocurl(1)'s"--fail"option. defaults tofalse.proxyβ host to use as proxy. corresponds tocurl(1)'s"--proxy"option. defaults to none.proxy_userβ username and password to use for the proxy, separated by a colon ("user:pwd"). corresponds tocurl(1)'s"--proxy-user"option. defaults to none.redirectβ boolean, decides whether to follow redirections. corresponds tocurl(1)'s"--location"option. defaults tofalse.compressedβ boolean, decides whether to request compressed content and automatically decompress it. corresponds tocurl(1)'s"--compressed"option. defaults tofalse.
ngl bestie,agentanduser_agentare both here and both point at"--user-agent". that's just what the page says, so i'm telling you exactly that. π
π§ $desc = curl_error($rt)
returns the string description of the curl() exit code $rt. so when your code comes back cursed, this is the friend who translates. π
β (\@response, \%head) = parse_http_header($header)
parses the HTTP header in $header.
"\@response"is an array ref holding the response's information. first element = the protocol information, second = the HTTP status code, third = a string with extra info about the response. π"\%head"is a hash of the data provided by the response's header fields.
π $desc = http_status_string($code)
returns the string description of the HTTP status code $code. dies if $code isn't a valid status code β so like, don't play with her. π
π GLOBAL VARIABLES
%WWW::Noss::Curl::CODES
a hash of curl() exit codes and their matching string descriptions. but fr fr, using the curl_error() function is preferable. π
π AUTHOR
written by Samuel Young, <samyoung12788@gmail.com>.
this project's source can be found on its Codeberg page <https://codeberg.org/1-1sam/noss.git>. comments and pull requests are welcome β come through! π«Ά
π COPYRIGHT
Copyright (C) 2025-2026 Samuel Young
this program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. slay, legally speaking. βοΈβ¨
π SEE ALSO
curl(1)noss
and that's the whole page, bestie β no crumbs left. this iconic little number is perl v5.42.2, dated 2026-02-15, and it's the WWW::Noss::Curl(3) manpage signing off. mwah ππ
π¦ where this page comes from
- alpine 3.24: perl-www-noss-doc 2.02-r1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms