File: Encoding.pm

package info (click to toggle)
libmessage-passing-perl 0.117-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 544 kB
  • sloc: perl: 2,742; makefile: 2; sh: 1
file content (43 lines) | stat: -rw-r--r-- 715 bytes parent folder | download | duplicates (4)
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
package Message::Passing::Exception::Encoding;
use Moo;
use Data::Dumper ();
use MooX::Types::MooseLike::Base qw/ Str /;
use namespace::clean -except => 'meta';

with 'Message::Passing::Exception';

has exception => (
    is => 'ro',
    required => 1,
);

has stringified_data => (
    is => 'ro',
    isa => Str,
    coerce => sub {
        Data::Dumper::Dumper($_[0]);
    },
);

1;

=head1 NAME

Message::Passing::Exception::Encoding - An issue when encoding data

=head1 ATTRIBUTES

=head2 exception

The exception encountered when trying to encode the message

=head2 stringified_data

The original message, dumped using L<Data::Dumper>.

=head1 AUTHOR, COPYRIGHT AND LICENSE

See L<Message::Passing>.

=cut