?
Solved

name and path of a module.

Posted on 2003-03-20
3
Medium Priority
?
195 Views
Last Modified: 2010-03-05
Is there a way to tell the path and the name of a perl-module at runtime?

eg.

package foo;

BEGIN        
{
    use Exporter   ();
     our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);

    @ISA         = qw( Exporter );
   
    @EXPORT      = qw( &myscriptdoc
                       &mydie );
   
    @EXPORT_OK   = qw( &myscriptdoc
                       &mydie
                       &str2ascii
                       &detime );

    docheck ("here i want to know the path and the name of the modules file itself.");
}


.....

1;


i know i could traverse the @INC and search, but i feel this to be unsafe.

tx, holli

0
Comment
Question by:holli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 8179379
__FILE__
0
 
LVL 6

Author Comment

by:holli
ID: 8180166
ozo, i would like to close this question and award the points to you, but there is not "accept"-button at the moment.

0
 
LVL 6

Author Comment

by:holli
ID: 8181690
there it is.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question