| 1 | #********************************************************************* | ||||||||||||||||||||
| 2 | #*** ResourcePool::Resource::SOAP::Lite | ||||||||||||||||||||
| 3 | #*** Copyright (c) 2003 by Markus Winand <mws@fatalmind.com> | ||||||||||||||||||||
| 4 | #*** $Id: Lite.pm,v 1.5 2011-01-31 13:49:38 mws Exp $ | ||||||||||||||||||||
| 5 | #********************************************************************* | ||||||||||||||||||||
| 6 | package ResourcePool::Resource::SOAP::Lite; | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 3 | ▶ | use vars qw($VERSION @ISA); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 3 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | 3 | ▶ | use SOAP::Lite; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | 3 | ▶ | use ResourcePool::Resource; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 3 | $VERSION = "1.0103"; | |||||||||||||||||||
| 14 | 3 | push @ISA, "ResourcePool::Resource"; | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 6 | ▶ | sub new($$$) { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 17 | 6 | my $proto = shift; | |||||||||||||||||||
| 18 | 6 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 19 | 6 | my $self = $class->SUPER::new(); | |||||||||||||||||||
| 20 | 6 | my $proxyurl = shift; | |||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 6 | my $soap; | |||||||||||||||||||
| 23 | 6 | eval { | |||||||||||||||||||
| 24 | 6 | $soap = SOAP::Lite->new(); | |||||||||||||||||||
| 25 | 6 | $soap->proxy($proxyurl); | |||||||||||||||||||
| 26 | 5 | $self->{soaph} = $soap; | |||||||||||||||||||
| 27 | }; | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 6 | ▶ | if (!$@) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 30 | 5 | bless($self, $class); | |||||||||||||||||||
| 31 | 5 | return $self; | |||||||||||||||||||
| 32 | } else { | ||||||||||||||||||||
| 33 | 1 | return undef; | |||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 0 | ▶ | sub close($) { | ||||||||||||||||||
|
Subroutine
close: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 38 | } | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 4 | ▶ | sub precheck($) { | ||||||||||||||||||
|
Subroutine
precheck: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 41 | 4 | return 1; | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 2 | ▶ | sub postcheck($) { | ||||||||||||||||||
|
Subroutine
postcheck: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 45 | 2 | return 1; | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 4 | ▶ | sub get_plain_resource($) { | ||||||||||||||||||
|
Subroutine
get_plain_resource: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 49 | 4 | my ($self) = @_; | |||||||||||||||||||
| 50 | 4 | return $self->{soaph}; | |||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 3 | 1; | |||||||||||||||||||