File: Record.pm

package info (click to toggle)
libfcgi-client-perl 0.09-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 232 kB
  • sloc: ruby: 510; perl: 408; makefile: 2
file content (64 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package FCGI::Client::Record;
use strict;
use warnings;
use FCGI::Client::Constant;
use FCGI::Client::RecordHeader;
use Types::Standard qw/Str/;

use Moo;
has header => (
    is => 'ro',
    isa => sub { die "header must be FCGI::Client::RecordHeader" unless UNIVERSAL::isa($_[0], 'FCGI::Client::RecordHeader') },
    handles => [qw/request_id content_length type/]
);
has content => ( is => 'ro', isa => Str );
no Moo;

__PACKAGE__->meta->make_immutable;
__END__

=head1 NAME

FCGI::Client::Record - record object for FCGI

=head1 SYNOPSIS

    my $record = FCGI::Client::Record->new(header => $header, content => $content);
    say $record->type;

=head1 DESCRIPTION

This module is record class for L<FCGI::Client>.

=head1 ATTRIBUTES

=over 4

=item header

'header' attribute is instance of L<FCGI::Client::RecordHeader>.

=item content

'content' attribute is string of record content.

=back

=head1 METHOD

=over 4

=item $self->request_id()

=item $self->content_length()

=item $self->type()

shortcut of $self->header->I<any_method>()

=back

=head1 SEE ALSO

L<FCGI::Client>