Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How would I integrate code within a module into main code?

Status
Not open for further replies.

bluetac

Programmer
Dec 29, 2000
27
0
0
GB
Hi

I need to use the Digest::SHA1 encryption and decryption functions in some code that i am writing, but unfortunately it isn't installed on the server where my perl script will eventually run.

I am trying (unsuccesfully) to integrate a local copy I have of the Sha1 perl module into my main script, so it wont have to rely on the perl module on the server.

Does anyone have some tips to point me in the right direction? Heres what the perl module Digest::SHA1 looks like


package Digest::SHA1;

use strict;
use vars qw($VERSION @ISA @EXPORT_OK);

$VERSION = '1.02'; # $Date: 1999/08/05 22:58:42 $

require Exporter;
*import = \&Exporter::import;
@EXPORT_OK = qw(sha1 sha1_hex sha1_base64);

require DynaLoader;
@ISA=qw(DynaLoader);
Digest::SHA1->bootstrap($VERSION);

*reset = \&new;

1;

thanks Andres Jugnarain
wireless editor
developer.thetuckshop.com
 
Hi there Andres,

Two questions:

1) Why can't you install the module on the target server?

2) If you're not allowed to - are you aware that you can install a local copy of the module - by installing it in the same directory that your script will run in. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top