http://www.perlmonks.org?node_id=839305


in reply to Re^6: sub BEGIN (order)
in thread sub BEGIN

soap::Lite is very hard to understand and it seem to incoporate lot of other classes under it.
In my limited module reading, I still do not see where SOAP::Deserializer::typecast is being defined. Since I cannot find them in cpan.org, I might as well wrote the sub as,
sub anything::typecast { }
?? or does keyword typecast(other than actually doing the typecasting which I don't know why perl would need it in general case) mean something else for general module?

Replies are listed 'Best First'.
Re^8: sub BEGIN (def'n)
by tye (Sage) on May 10, 2010 at 20:54 UTC

    Click SOAP::Lite then click the "Source" link near the top to get to Lite.pm. Search for "sub typecast" and then search backward for /^package/ and you'll find the "package SOAP::Deserializer;" line. Thus the "sub typecast" is where the original SOAP::Deserializer::typecast() is defined. And, no, "typecast" is not a special keyword. Search for uses of "typecast" elsewhere in that source code.

    I suspect (but haven't verified) that "they" expect you to "replace" the typecast() functionality by subclassing (inheritance) rather than how it is attempted in the root of this thread.

    - tye