Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6790965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:47:21+00:00 2026-05-26T17:47:21+00:00

I am rummaging through 7900+ lines of perl code. I needed to change a

  • 0

I am rummaging through 7900+ lines of perl code. I needed to change a few things and things were going quite well even though i am just 36 hours into perl. I learned the basic constructs of the language and was able to get small things done. But then suddenly I have found a function call which does not have any definition anywhere. I grep’ed several times to check for all ‘sub’. I could not find the functions definition. What am I missing ? Where is the definition of this function. I am quite sure this is a user defined function and not a library function(from its name i guessed this).
Please help me find this function’s definition.

Here is a few lines from around the function usage.

(cfg_machine_isActive($ep)) {
         staf_var_set($ep, VAR_PHASE, PHASE_PREP);
         staf_var_set($ep, VAR_PREP,  STATE_RUNNING);
      } else {
         cfg_machine_set_state($ep, STATE_FAILED);
      }
   }
   $rc = rvt_deploy_library();       #this is the function that is the problem 
   dump_states() unless ($rc != 0);

Here is the answer:

(i could not post this an answer itself cos i dont have enough reputation)

I found that the fastest way to find the definition of an imported function in perl are the following commands:

>perl.exe -d <filename>.pl

This starts the debugger.
Then; do

b <name of the function/subroutine who's definition you are looking for>

in our case that would mean entering:

b rvt_deploy_library

next press ‘c’ to jump to the mentioned function/subroutine.

This brings the debugger to the required function. Now, you can see the line no. and location of the function/subroutine on the console.

main::rvt_deploy_library(D:/CAT/rvt/lib/rvt.pm:60): 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:47:22+00:00Added an answer on May 26, 2026 at 5:47 pm

    There are a number of ways to declare a method in Perl. Here is an almost certainly incomplete list:

    1. The standard way, eg. sub NAME { ... }
    2. Using MooseX::Method::Signatures, method NAME (...) {...}
    3. Assignment to a typeglob, eg. *NAME = sub {...};

    In addition, if the package declares an AUTOLOAD function, then there may be no explicit definition of the method. See perlsub for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn jquery and rummaging through jquery's documentation is not fun for
I have spent a bit of time rummaging through Stack Overflow to find out
So this is a question I've been asking the pyroCMS guys because while rummaging
I'm running through theForger's Win32 API Programming Tutorial . On page 4 he suggests
I'm working on a site that exposes endpoints over HTTP and HTTPS through Azure
Ever since Froyo (Android 2.2), Google's Android OS has supported syncing Microsoft Exchange accounts
I am investigating a production system where there are several Windows services communicating with
This is related to Floor a date in SQL server , but I'm taking
I am studying coinduction( not induction) as part of a class on static analysis.
Whenever I load a Task class, the Document property is always null, despite there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.