| FCGI-Client documentation | Contained in the FCGI-Client distribution. |
FCGI::Client::RecordHeader - record header object for FCGI
my $header = FCGI::Client::RecordHeader->new(raw => $raw);
say $header->type;
This module is record header class for FCGI::Client.
the raw string of record header. size of record header is defined at FCGI::Client::Constant::FCGI_HEADER_LEN.
These methods returns each field of record header.
| FCGI-Client documentation | Contained in the FCGI-Client distribution. |
package FCGI::Client::RecordHeader; use Any::Moose; use FCGI::Client::Constant; has raw => ( is => 'ro', isa => 'Str' ); sub content_length { unpack( 'x4n', $_[0]->raw ) } sub padding_length { unpack( 'x6C', $_[0]->raw ) } sub type { unpack( 'xC', $_[0]->raw ) } sub request_id { unpack( 'xxn', $_[0]->raw ) } __PACKAGE__->meta->make_immutable; __END__