Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 meditating upon the Monastery: (10)
As of 2014-08-28 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (257 votes), past polls