Net::A...esponse(3pm)
π Net::Amazon::S3::Response π
okay bestie, welcome to the manual page for Net::Amazon::S3::Response, which is part of the perl docs (the 3pm girlies know β¨). She's the vibe that basically every S3 response shares. Let's get into it π«Ά
β¨ NAME β¨
Net::Amazon::S3::Response β behaviour common to most S3 responses. literally the shared personality of the whole response family π
πΈ VERSION πΈ
version 0.992 β she's serving a specific number, no cap
π¦ SYNOPSIS π¦
package Command::Response;
extends 'Net::Amazon::S3::Response';
...
my $response = Command::Response->new (
http_response => $http_response,
);
see how she just extends it? main character energy fr fr π
π DESCRIPTION π
So this is the response handler base class π She provides all the functionality that's common to most S3 responses. Think of her as the group chat everyone else inherits their whole personality from.
π EXTENDING π
Net::Amazon::S3::Response provides methods to cache response data. caching is self care, periodt π
_dataβ read-only accessor, initialized by_build_data._build_dataβ the data builder π By default she calls_parse_dataif the response is a success and provides a valid XML document._parse_dataβ abstract (undefined in the parent!) method that has to be implemented by the children. yep, the parent just leaves this one blank, it's giving "figure it out yourselves besties" π
β METHODS β
π§ Constructor π§
The constructor accepts exactly one (required) parameter β http_response π«Ά It should act like HTTP::Response.
π Response classification methods π
is_successβ true if the response is a success response, false otherwise. β οΈ heads up: a successful response may contain invalid XML. yes queen, she's messy like that.is_redirectβ true if the response is a redirect.is_errorβ true if the response is an error response, false otherwise. A response counts as an error either when the response code is an HTTP error (4xx or 5xx) or when the response content is an error XML document.
See also "S3 Error Response" <https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html> for more details.
is_internal_responseβ true if the response was generated by the user agent itself (eg:Cannot connect).is_xml_contentβ true if the response data is a valid XML document.
π Error handling π
Apart from error classification, Net::Amazon::S3::Response also provides common error data accessors.
bestie, listen: error data are available only in case of an error response. no error, no data. that's the rule π
error_codeβ either the content of theError/CodeXML element, or the HTTP response code.error_messageβ either the content of theError/MessageXML element, or the HTTP response message.error_request_idβ the content of theError/RequestIdXML element if available, thex-amz-request-idheader if available, empty list otherwise.error_resourceβ the content ofc<Error/Resource>if available, the request uri otherwise.
π Common Response Headers π
See "S3 Common Response Headers" <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html> for more details.
content_lengthcontent_typeconnectionetagβ ETag with trimmed leading/trailing quotes. she's clean like that β¨serverdelete_markerrequest_idid_2version_id
π₯ XML Document parsing π₯
xml_documentβ lazy built instance ofXML::LibXML. Available only if the response is an XML response and contains a valid XML document.xpath_contextβ lazy built instance ofXML::LibXML::XPathContext. Available only if the response is an XML response and contains a valid XML document.
πΈ HTTP Response methods πΈ
Further methods are delegated to http_response. Refer to HTTP::Response for a description. iykyk π
codemessagestatus_linecontentdecoded_contentheaderheadersheader_field_names
π AUTHOR π
Branislav ZahradnΓk <barney@cpan.org>
π COPYRIGHT AND LICENSE π
This module is part of Net::Amazon::S3.
π AUTHOR π
Branislav ZahradnΓk <barney@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2025 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav ZahradnΓk.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie, no notes, absolute slay β¨π π¦
cute lil sign-off: this was perl v5.40.1, dated 2025-12-07, and it's the Net::Amazon::S3::Response page β mwah π go forth and parse some XML responsibly π
π¦ where this page comes from
- ubuntu resolute: libnet-amazon-s3-perl 0.992-1 Β· other
- ubuntu stonking: libnet-amazon-s3-perl 0.992-1 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms