Loading ...
Sorry, an error occurred while loading the content.

To see the origin of method...

Expand Messages
  • netsquire
    How can I see the origin of some method? i.e. - where (in what file, or package) was defined this sub?
    Message 1 of 2 , Jul 15 1:23 AM
    • 0 Attachment
      How can I see the origin of some method?
      i.e. - where (in what file, or package) was defined this sub?
    • Arun Pandey
      Perl function caller should help you out caller EXPR caller Returns the context of the current subroutine call. In scalar context, returns the caller s
      Message 2 of 2 , Jul 15 1:38 AM
      • 0 Attachment
        Perl function caller should help you out

        caller EXPR

        caller Returns the context of the current subroutine

        call. In scalar context, returns the caller's

        package name if there is a caller, that is, if

        we're in a subroutine or "eval" or "require", and

        the undefined value otherwise. In list context,

        returns



        ($package, $filename, $line) = caller;



        With EXPR, it returns some extra information that

        the debugger uses to print a stack trace. The

        value of EXPR indicates how many call frames to go

        back before the current one.



        ($package, $filename, $line, $subroutine, $hasargs,

        $wantarray, $evaltext, $is_require, $hints, $bitmask)
        = caller($i);



        From: perl-beginner@yahoogroups.com
        [mailto:perl-beginner@yahoogroups.com] On Behalf Of netsquire
        Sent: Wednesday, July 15, 2009 1:54 PM
        To: perl-beginner@yahoogroups.com
        Subject: [PBML] To see the origin of method...








        How can I see the origin of some method?
        i.e. - where (in what file, or package) was defined this sub?




        "Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment."
        www.cybage.com




        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.