in reply to Re^3: How to use a module without installing it?
in thread How to use a module without installing it?

If I'm understanding you correctly, you still have a require (or use) in your code — at least that's what the error message "Can't locate..." would suggest.

Once you have a module's code pasted into the main script, there's no longer any need to require it (i.e. load it from an external file), as it's already there... So just remove or comment out the respective require/use instructions.

  • Comment on Re^4: How to use a module without installing it?

Replies are listed 'Best First'.
Re^5: How to use a module without installing it?
by LanX (Saint) on Aug 06, 2009 at 00:02 UTC
    Please correct me if I'm wrong, I never tried it myself...

    ...but use X implies to require X and to call X->import(LIST), so certainly you can comment out the require, but you still need to import!

    see use

    Cheers Rolf

      ... but you still need to import!

      That's correct — in case you actually want to import anything (or need to pass whatever parameters to the module's import method; or the module insists on having its import method called for some other reason).  OTOH, with many modules (especially OO-style ones) there's no need to import stuff, so there's a good chance you'd get away without calling import...  (I figured the OP would come back in case of problems :)