File Coverage

blib/lib/W3C/SOAP/WSDL/Document/Port.pm
Criterion Covered Total %
statement 27 36 75.0
branch 0 2 0.0
condition n/a
subroutine 9 11 81.8
pod n/a
total 36 49 73.4


line stmt bran cond sub pod time code
1             package W3C::SOAP::WSDL::Document::Port;
2              
3             # Created on: 2012-05-27 19:52:35
4             # Create by: Ivan Wills
5             # $Id$
6             # $Revision$, $HeadURL$, $Date$
7             # $Revision$, $Source$, $Date$
8              
9 1     1   4 use Moose;
  1         2  
  1         22  
10 1     1   4645 use warnings;
  1         3  
  1         22  
11 1     1   4 use version;
  1         2  
  1         4  
12 1     1   45 use Carp;
  1         3  
  1         51  
13 1     1   5 use Scalar::Util;
  1         1  
  1         26  
14 1     1   4 use List::Util;
  1         1  
  1         40  
15             #use List::MoreUtils;
16 1     1   5 use Data::Dumper qw/Dumper/;
  1         1  
  1         40  
17 1     1   4 use English qw/ -no_match_vars /;
  1         1  
  1         5  
18 1     1   368 use W3C::SOAP::Utils qw/split_ns/;
  1         1  
  1         7  
19              
20             extends 'W3C::SOAP::Document::Node';
21              
22             our $VERSION = version->new('0.11');
23              
24             has binding => (
25             is => 'rw',
26             isa => 'W3C::SOAP::WSDL::Document::Binding',
27             builder => '_binding',
28             weak_ref => 1,
29             lazy => 1,
30             );
31             has address => (
32             is => 'rw',
33             isa => 'Str',
34             builder => '_address',
35             lazy => 1,
36             );
37              
38             sub _binding {
39 0     0     my ($self) = @_;
40 0           my ($ns, $name) = split_ns($self->node->getAttribute('binding'));
41              
42 0           for my $binding (@{ $self->document->bindings }) {
  0            
43 0 0         return $binding if $binding->name eq $name;
44             }
45              
46 0           return;
47             }
48              
49             sub _address {
50 0     0     my ($self) = @_;
51 0           my ($address) = $self->document->xpc->findnodes('soap:address', $self->node);
52 0           return $address->getAttribute('location');
53             }
54              
55             1;
56              
57             __END__
58              
59             =head1 NAME
60              
61             W3C::SOAP::WSDL::Document::Port - Represents the ports in a WSDL document
62              
63             =head1 VERSION
64              
65             This documentation refers to W3C::SOAP::WSDL::Document::Port version 0.11.
66              
67              
68             =head1 SYNOPSIS
69              
70             use W3C::SOAP::WSDL::Document::Port;
71              
72             # Brief but working code example(s) here showing the most common usage(s)
73             # This section will be as far as many users bother reading, so make it as
74             # educational and exemplary as possible.
75              
76              
77             =head1 DESCRIPTION
78              
79             A C<W3C::SOAP::WSDL::Document::Port> object represents the port tags
80             in a WSDL document.
81              
82             =head1 SUBROUTINES/METHODS
83              
84             =over 4
85              
86             =back
87              
88             =head1 DIAGNOSTICS
89              
90             =head1 CONFIGURATION AND ENVIRONMENT
91              
92             =head1 DEPENDENCIES
93              
94             =head1 INCOMPATIBILITIES
95              
96             =head1 BUGS AND LIMITATIONS
97              
98             There are no known bugs in this module.
99              
100             Please report problems to Ivan Wills (ivan.wills@gmail.com).
101              
102             Patches are welcome.
103              
104             =head1 AUTHOR
105              
106             Ivan Wills - (ivan.wills@gmail.com)
107              
108             =head1 LICENSE AND COPYRIGHT
109              
110             Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077).
111             All rights reserved.
112              
113             This module is free software; you can redistribute it and/or modify it under
114             the same terms as Perl itself. See L<perlartistic>. This program is
115             distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
116             without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
117             PARTICULAR PURPOSE.
118              
119             =cut