Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 ( [id://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?

Replies are listed 'Best First'.
(tye)Re2: How to make a module aware of where it is installed?
by tye (Sage) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217520]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found