/usr/share/perl5/Data/AMF/Message.pm is in libdata-amf-perl 0.09-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | package Data::AMF::Message;
use Any::Moose;
use Scalar::Util qw/blessed/;
has target_uri => (
is => 'rw',
isa => 'Str',
required => 1,
);
has response_uri => (
is => 'rw',
isa => 'Str',
required => 1,
);
has value => (
is => 'rw',
);
has source => (
is => 'rw',
);
has version => (
is => 'rw',
isa => 'Int',
);
no Any::Moose;
sub result {
my ($self, $obj) = @_;
my $class = blessed $self;
$class->new(
target_uri => $self->response_uri . '/onResult',
response_uri => '',
value => $obj,
version => $self->version,
);
}
sub error {
my ($self, $obj) = @_;
my $class = blessed $self;
$class->new(
target_uri => $self->response_uri . '/onStatus',
response_uri => '',
value => $obj,
version => $self->version,
);
}
__PACKAGE__->meta->make_immutable;
__END__
=head1 NAME
Data::AMF::Message - AMF Message class
=head1 SYNOPSIS
use Data::AMF::Packet;
# get message
my $packet = Data::AMF::Packet->deserialize($amf_packet);
my $messages = $packet->messages;
# do something about it
my $first_request = $messages->[0];
# and return response
my $response = $first_request->result($perl_object_you_want_to_return);
=head1 DESCRIPTION
Data::AMF::Message is an object class for AMF Packet Message.
=head1 SEE ALSO
L<Data::AMF::Packet>, L<Catalyst::Controller::FlashRemoting>
=head1 METHODS
=head2 new
Create new Data::AMF::Message object.
=head2 result($result)
Return normal response AMF Message object against current request of AMF Message.
=head2 error($error)
Return error response AMF Message object against current request of AMF Message.
=head1 AUTHOR
Daisuke Murase <typester@cpan.org>
=head1 COPYRIGHT
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the
LICENSE file included with this module.
=cut
|