Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

name and path of a module.

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
holli
Asked:
holli
  • 2
1 Solution
 
ozoCommented:
__FILE__
0
 
holliAuthor Commented:
ozo, i would like to close this question and award the points to you, but there is not "accept"-button at the moment.

0
 
holliAuthor Commented:
there it is.
0

Featured Post

Industry Leaders: 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!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now