/usr/share/perl5/MooseX/App/Message/Block.pm is in libmoosex-app-perl 1.37-1.
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 | # ============================================================================
package MooseX::App::Message::Block;
# ============================================================================
use 5.010;
use utf8;
use namespace::autoclean;
use Moose;
use MooseX::App::Utils;
use overload
'""' => "stringify";
has 'header' => (
is => 'ro',
isa => 'MooseX::App::Types::MessageString',
predicate => 'has_header',
);
has 'type' => (
is => 'ro',
isa => 'Str',
default => sub {'default'},
);
has 'body' => (
is => 'ro',
isa => 'MooseX::App::Types::MessageString',
predicate => 'has_body',
);
sub stringify {
my ($self) = @_;
my $message = '';
$message .= $self->header."\n"
if $self->has_header;
$message .= $self->body."\n\n"
if $self->has_body;
return $message;
}
__PACKAGE__->meta->make_immutable;
1;
__END__
=encoding utf8
=head1 NAME
MooseX::App::Message::Block - Message block
=head1 DESCRIPTION
A simple message block with a header and body
=head1 METHODS
=head2 header
Read/set a header string
=head2 has_header
Check if a header is set
=head2 body
Read/set a body string
=head2 has_body
Check if a body is set
=head2 type
Read/set an arbitrary block type. Defaults to 'default'
=head2 stringify
Stringify a message block
|