Subject: | If array-refs are passed to register_wsdl(), they are modified |
If I go like this in my Catalyst::Model::SOAP-based model:
__PACKAGE__->register_wsdl({
wsdl => $config->{wsdl}, # array-ref
schema => $config->{xsd}, # array-ref
}, 'Something');
$config->{wsdl} and $config->{xsd} are changed afterwards. Now, if I had
just said:
__PACKAGE__->register_wsdl({
wsdl => [ 'something.wsdl', 'other.wsdl' ],
schema => [ 'something.xsd', 'else.xsd' ],
}, 'Something');
It wouldn't matter much, but in the first case, I am surprised when
looking in $config later.
It this by design or accident?
I can work around it by doing:
__PACKAGE__->register_wsdl({
wsdl => [ @{$config->{wsdl}} ],
schema => [ @{$config->{xsd}} ],
}, 'Something');
But perhaps that doesn't feel so nice?
Best regards, Adam.