in reply to How do I write what I need, given that I know nothing at all about perl.

If you want to use a specific version of a module, IIRC use will take a filename as well as a modulename. Whoops, after checking, use won't allow a filename, but require will. So if you want, you can say somthing like require '/home/you/perllocal/site/DBIx/Password.pm';, and be assured that you're picking up the right version. (BTW, use and require have other differneces too. If you're using an OOish convention for DBIx::Password (that is, all functions you use in DBIx::Password are either fully named (IE include "DBIx::Password" in them) or use an object that was already created using a fully-named call) then it won't matter. If you aren't, you need to wrap the require inside a BEGIN {...} block (for reasons I don't feel like explaining, it needs to happen earlier then it would with normal code, at the BEGINing of your program's lifetime, just after the line is compiled. use does this for you, behind the seans. The POD (Plain Old Documentation) for DBIx::Password uses a style that would be OK, so you probably don't need the BEGIN block. (BTW, I'm not yelling, BEGIN has to be written in all-caps.)


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

  • Comment on Re: How do I write what I need, given that I know nothing at all about perl.
  • Download Code