On Thu, 2003-12-11 at 05:51, Randy W. Sims wrote:
> On 12/11/2003 5:41 AM, Yannick Warnier wrote:
> 
> > Hi all,
> > 
> > Is there an easy function to apply an md5 to a string? (sha1 could also
> > do)
> > I've looked at the perl base functions and didn't find it but I would
> > like to avoid the use of modules as much as I can.
> > 
> > Thanks,
> > Yannick
> > 
> > 
> Digest::MD5 & Digest::SHA1
> 
> Both of these modules are included in core perl. There are no builtins 
> as you describe, but that shouldn't be a problem since these are core 
> modules. Why avoid modules?

Caveat Coder!  Perl can be set up so that the @INC doesn't point to the
core modules.  I have seen this on shared hosting, where (I assume) the
sys admin decided to use it as a way to secure the box.

Of course, if you use something like this:

BEGIN  {
  unshift "./modules", @INC;
}

you can then store all your modules in the ./modules directory and have
them accessed.  Of course, this may or may not violate their terms if
you're selling the script.

-Dan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to