> in order to make sure I can really call it I have to do something like

I'm not sure if it covers your question but perl supports a coderef syntax for method calls (which BTW is much faster)

$thing->$c_get_object->$c_get_another_object->$c_do_something

(ATM I can't find the corresponding perldoc) ¹

So when your sure that the methods are not dynamically added or deleted at run-time from the corresponding class, you can make sure that that those methods exist and init the coderefs like constants (e.g. in a BEGIN block).

Cheers Rolf

UPDATE: 1) greping helps, see perltooc#Inheritance Concerns:

Because the &UNIVERSAL::can method returns a reference to the function directly, you can use this directly for a significant performance improvement:
for my $parent (@ISA) { if (my $coderef = $self->can($parent . "::CData1")) { $self->$coderef($newvalue); } }

In reply to Re: Error handling in chained method calls by LanX
in thread Error handling in chained method calls by szabgab

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.