First of all thank you for your answer, i get it now. Second, i know about my errors i wrote the post too quickly (in a bit of a time squeeze so read it as a pseudo code) And Third, I am always on a lookout for a better way (especially if there is already a solution ):).

Genera idea is to have an execution class that checks whether the execution passed to it, is simply a system command or a function or an object method. For example let say I am programming something and i need to execute a cmd but i do not want to know how to handle errors, exceptions etc... so I pass it to a class that executes the cmd and returns me an error/result/warning. But sometimes I do not want to pass a system cmd, I want to implement the command in my own function (with parsing) and still use the same module to check for errors/results/exceptions. Moreover, let say maye I know how to OOp (I don't but...) so I don't have a regular function but my methods are encapsulated/members of my own classes which again I want to pass to this third party module and get errors/warnings etc... back.

Is there anything like that out there. I surveyed for this for couple weeks not and could not find a universal solution .


In reply to Re^2: Passing a class method by baxy77bax
in thread Passing a class method by baxy77bax

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.