Message.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 1 totaltotal 84.0% 21 / 25 CC 1 SCAR 1.5
CC
1
Cov
94%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Session/BackendQ.pm ↑ Summary SRSResponse.pm »
1 # vim: filetype=perl:noexpandtab:ts=3:sw=3
2 #
3 # Copyright (C) 2009 NZ Registry Services
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the Artistic License 2.0 or later. You should
7 # have received a copy of the Artistic License the file COPYING.txt.
8 # If not, see <http://www.perlfoundation.org/artistic_license_2_0>
9  
10 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 package SRS::EPP::Message;
14 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 has 'xml' =>
17 is => "rw",
18 ;
19  
20 has 'message' =>
21 is => "rw",
22 handles => [qw(to_xml)],
23 0 ▶ trigger => sub { $_[0]->message_trigger },
Subroutine __ANON__: not called CC=1 SCAR=6.9
24 1 ;
25  
26 # for use with 'around', 'after' modifiers
27 ▶sub message_trigger { }
Subroutine message_trigger: not called CC=1 SCAR=0.0
Pod undocumented
28  
29 1 has 'error' =>
30 is => "rw",
31 ;
32  
33 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 1 __PACKAGE__->meta->make_immutable;
35  
36 1 1;
37  
38 __END__
39  
40 =head1 NAME
41  
42 SRS::EPP::Message - abstract type for a single message particle
43  
44 =head1 SYNOPSIS
45  
46 my $msg = SRS::EPP::Message->new(
47 message => $object,
48 xml => $xml,
49 error => $message,
50 );
51 # convert a message to XML
52 $message->to_xml;
53  
54 =head1 DESCRIPTION
55  
56 This class is a common ancestor of EPP commands and responses, as well
57 as SRS requests and responses. Currently the only method that all of
58 these implement is conversion to XML; however parsing is likely to
59 follow.
60  
61 =head1 SEE ALSO
62  
63 L<SRS::EPP::Command>, L<SRS::EPP::Response>
64  
65 =for thought
66  
67 What space should we stick SRS messages under? I reckon maybe plain
68 SRS::Request:: and SRS::Response::, and subclass them...
69  
70 =cut
71  
72 # Local Variables:
73 # mode:cperl
74 # indent-tabs-mode: t
75 # cperl-continued-statement-offset: 8
76 # cperl-brace-offset: 0
77 # cperl-close-paren-offset: 0
78 # cperl-continued-brace-offset: 0
79 # cperl-continued-statement-offset: 8
80 # cperl-extra-newline-before-brace: nil
81 # cperl-indent-level: 8
82 # cperl-indent-parens-as-block: t
83 # cperl-indent-wrt-brace: nil
84 # cperl-label-offset: -8
85 # cperl-merge-trailing-else: t
86 # End:
« Session/BackendQ.pm ↑ Summary SRSResponse.pm »