use MooseX::Declare; class API::Translator { use strict; use warnings; has 'normalizer' => ( is =>'rw', isa => 'Address::Normalizer'); # This method throws an error regardless of what I pass it. The error is thrown on the line that defines the method itself, so it doesn't matter what code is inside the method. We never get that far. method normalize($address) { require Address::Normalizer; # Initialize the services needed to normalize addresses. $self->normalizer( Address::Normalizer->new->connect('127.0.0.1', '56789') ); $self->normalizer->normalize($address); return $self->normalizer->response(); } # This function from the SOAP::Lite documentation. This returns data without error. sub f2c { my ($class, $f) = @_; return 5/9*($f-32); } }