I wish my project wasn't on such a tight deadline, because I'd really like to get to know this MooseX::Declare. There's obviously a lot I don't know about it, but it seems like it's a tremendous simplification of the existing Moose object structure which is a tremendous simplification of the existing Perl object structure.

I took your advice and backed off to Moose. What you said about class method vs. instance method is correct. Moving to Moose didn't eliminate that problem and honestly it took me several more hours to figure out that I wasn't going to solve that problem.

I know that SOAP should allow initializing and calling objects as if the SOAP service were on the local machine. That was what I was attempting, however, I couldn't figure it out. So I devised a work around that I'm sure pure SOAP proponents would find appalling. But I reevaluated my requirements and determined that I could get by without this functionality.

My SOAP::Lite server now calls a module that looks like this:

package API; use API::Translator; use Moose; sub normalize { my ($class, $address) = @_; my $service = API::Translator->new(); return $service->normalize($address); }

This pushes initialization of the API::Translator object behind the SOAP server allowing use to reference methods within that object without issue. It's not a solution I'm completely happy with, but it works.

In retrospect, I'm sure there is a way I can bless the hashref of the object that gets passed through the SOAP server to avoid this middle man class, but like I said above, sometimes the timeline dictates the direction you go.

I appreciate your direction. Thank you.


In reply to Re^2: SOAP::Lite and Moose. Moose and SOAP::Lite by desoto
in thread SOAP::Lite and Moose. Moose and SOAP::Lite by desoto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.