Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: (tye)Re: How to make a module aware of where it is installed?

by jaldhar (Vicar)
on Dec 04, 2002 at 16:35 UTC ( #217520=note: print w/ replies, xml ) Need Help??


in reply to (tye)Re: How to make a module aware of where it is installed?
in thread How to make a module aware of where it is installed?

Ah ok I misunderstood. This makes my Makefile.Pl marginally simpler, but still doesn't solve the problem of the module itself knowing where it is installed.

--
જલધર


Comment on Re: (tye)Re: How to make a module aware of where it is installed?
(tye)Re2: How to make a module aware of where it is installed?
by tye (Cardinal) on Dec 04, 2002 at 16:43 UTC

    If your module is called Foo::Bar, then $INC{"Foo/Bar.pm"} will give you the full path to your Bar.pm file. Or you could use __FILE__ for the same thing. Then use File::Basename and/or File::Spec (see also File::Spec) to get the path of just the directory.

            - tye

      Yep. that's what I do now based on atcroft's suggestion.

      --
      જલધર

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://217520]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-07-04 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls