WWW::Noss::Curl(3)

πŸ“¦
version 2.02 Β· 2 versions
, in alpine 3.24

πŸ’… 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 πŸ‘†).

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 of 0 means 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 to curl(1)'s "--silent" option. defaults to false.
  • agent β€” string to use as user agent. corresponds to curl(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 to curl(1)'s "--time-cond" option. defaults to none.
  • remote_time β€” copy the remote file's modification time when downloading a file. corresponds to curl(1)'s "--remote-time" option. defaults to false.
  • etag_save β€” path to the file you wanna write the remote file's etag to, if it has one. corresponds to curl(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 to curl(1)'s "--etag-compare" option. defaults to none.
  • limit_rate β€” the download rate to limit curl(1) to. corresponds to curl(1)'s "--limit-rate" option. defaults to none.
  • user_agent β€” the user agent string to send to the server. corresponds to curl(1)'s "--user-agent" option. defaults to none.
  • timeout β€” maximum time in seconds a transfer is allowed to take. corresponds to curl(1)'s "--max-time" option. defaults to no timeout.
  • fail β€” boolean, decides if curl(1) should fail with no output on server errors. corresponds to curl(1)'s "--fail" option. defaults to false.
  • proxy β€” host to use as proxy. corresponds to curl(1)'s "--proxy" option. defaults to none.
  • proxy_user β€” username and password to use for the proxy, separated by a colon ("user:pwd"). corresponds to curl(1)'s "--proxy-user" option. defaults to none.
  • redirect β€” boolean, decides whether to follow redirections. corresponds to curl(1)'s "--location" option. defaults to false.
  • compressed β€” boolean, decides whether to request compressed content and automatically decompress it. corresponds to curl(1)'s "--compressed" option. defaults to false.
ngl bestie, agent and user_agent are 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 (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


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