[Catalyst-commits] r13995 -
Catalyst-Model-SOAP/1.0/trunk/lib/Catalyst/Model
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Mon Apr 4 18:55:42 GMT 2011
Author: rafl
Date: 2011-04-04 18:55:42 +0000 (Mon, 04 Apr 2011)
New Revision: 13995
Modified:
Catalyst-Model-SOAP/1.0/trunk/lib/Catalyst/Model/SOAP.pm
Log:
Rely on arguments from the constructor
Don't access config from a component. However, we still do it sometimes to
guarantee back-compat to the weird stuff the tests are doing. That code path
shouldn't be hit by actual cat apps though. Or so I hope.
Modified: Catalyst-Model-SOAP/1.0/trunk/lib/Catalyst/Model/SOAP.pm
===================================================================
--- Catalyst-Model-SOAP/1.0/trunk/lib/Catalyst/Model/SOAP.pm 2011-03-29 09:30:32 UTC (rev 13994)
+++ Catalyst-Model-SOAP/1.0/trunk/lib/Catalyst/Model/SOAP.pm 2011-04-04 18:55:42 UTC (rev 13995)
@@ -4,6 +4,7 @@
use XML::Compile::WSDL11;
use XML::Compile::Util qw/pack_type/;
use List::Util qw/first/;
+ use Scalar::Util qw/blessed/;
use base qw(Catalyst::Model);
our $VERSION = '1.5';
@@ -40,14 +41,14 @@
$wsdl_obj->importDefinitions($schema)
}
- my $transport = $self->config->{transport};
+ my $transport = blessed $self ? $self->transport : $self->config->{transport};
my $service = $self->config->{service};
if (ref $target eq 'HASH') {
# I'll have to implement a piece of XML::Compile::SOAP::WSDL11 here,
# as it doesn't provide a way to list the operations for a single port
foreach my $portname (keys %{$target}) {
- my $realtarget = $self.'::'.$target->{$portname};
+ my $realtarget = (blessed $self || $self).'::'.$target->{$portname};
no strict 'refs';
@{$realtarget.'::ISA'} = qw(Catalyst::Model::SOAP::Instance);
@@ -57,7 +58,7 @@
}
} else {
- my $realtarget = $self.'::'.$target;
+ my $realtarget = (blessed $self || $self).'::'.$target;
no strict 'refs';
@{$realtarget.'::ISA'} = qw(Catalyst::Model::SOAP::Instance);
foreach my $operation ($wsdl_obj->operations()) {
More information about the Catalyst-commits
mailing list