Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Cant get a specific module.

by Anonymous Monk
on Jul 05, 2002 at 14:25 UTC ( #179640=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have this error message on my NT workstation after I try and download the Email-Find module. I have never had a problem downloading modules except for this one I just tried today:
PPM> install Email-Find Install package 'Email-Find?' (y/N): y Installing package 'Email-Find'... Error installing package 'Email-Find': Read a PPD for 'Email-Find', bu +t it is no t intended for this build of Perl (MSWin32-x86-multi-thread)
Here is the version I have:
This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 631 provided by ActiveState Tool Corp. http://www.ActiveS +tate.com Built 17:16:22 Jan 2 2002
Can anyone advise how I can not get this module????

Replies are listed 'Best First'.
Re: Cant get a specific module.
by zaimoni (Beadle) on Jul 05, 2002 at 16:50 UTC

    Here's what I would do (did, to make this writeup):

    1. Go to ActiveState (http://www.activestate.com/), then navigating to the binary directory containing the ZIP archives for the Win32 6xx releases. Navigating to the Email-Find entry from Perl modules on the front end is a good first step.
    2. Once you have downloaded Email-Find.zip, unzip it to a temporary directory. Now we see the problem: the thing only has Solaris and Linux builds!
    3. Note that ActiveState's is V0.02. Checking CPAN, we find that V0.09 exists (and is certified to work only on Linux). Download and untarball to temporary directory. Observe the absence of a *.xs file in the MANIFEST: this version is pure Perl. However, we have dependencies on Email::Valid and Mail::Address. Mail::Address is indexed at CPAN; Email::Valid is archived at ActiveState...and is also available from ActiveState only for Linux/Solaris.
    4. Download and untarball MailTools from CPAN to a temporary directory. (This has Mail::Address.) No *.xs files here...good.
    5. Do the same thing for Email::Valid that we did for Email::Find.
    6. Hmm...the HTML docs say that "In my experience, however, Net::DNS queries seem to take an extremely long time when a record cannot be found." (If Net::DNS is not installed, the fallback is the external program nslookup.)
    7. Also, there is a reference to AUTOLOAD in Email::Valid...oops, there's probably an *.xs file somewhere in the source distribution.

    Sorry. Without the inferred C source code (*.xs file) for the extension module (or its definitive absence), it would be difficult to see why ActiveState didn't port Email::Valid. (The total divergence between UNIX and Win32 on network functions is a good guess.) Also, manual installation is a priori likely to break. (You're welcome to try, even if it looks like a Sisyphean task a priori. I do use ActivePerl as a Perl platform, and I'd be interested in knowing whether the manual install worked).

    If the C source code actually exists and is available, and you had access to MS VC++ 6.0 (or whatever ActiveState used for build 631), and the exact compiler options ActiveState used were correctly recorded in the Perl install, you might be able to compile the extension module for Email::Valid.

Re: Cant get a specific module.
by crazyinsomniac (Prior) on Jul 06, 2002 at 12:19 UTC
    So what version of PPM do you have?

    I have always found the following to work best, especially with the latest version of ppm (version 3)

    always ppm>search module then describe module then install module

    If there is a version compatible with your perl/platform, then it'll get installed.

    In this case, no such module available. Here is a session I just experienced using ppm3

    ppm> s Email Searching in Active Repositories 1. Log-Dispatch [1.80] Uniform logging interface to multiple ou +tputs 2. Email-Find [0.02] Find RFC 822 email addresses in plain te +xt 3. CGI-Untaint-email [0.03] validate an email address 4. Email-Valid [0.13] Check validity of Internet email address +es ppm> d 2 ==================== Package 2: Name: Email-Find Version: 0.09 Author: MIYAGAWA Tatsuhiko (miyagawa@bulknews.net) Title: Email-Find Abstract: Find RFC 822 email addresses in plain text Prerequisites: 1. Email-Valid 0.0 2. MailTools 0.0 3. Test-Simple 0.0 Available Platforms: 1. i686-linux-thread-multi ==================== ppm> rep desc 1 Describing Active Repository 1: Name: win Location: http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServe +r Type: PPMServer 2.0 ppm> rep desc 2 Describing Active Repository 2: Name: PPM Location: http://www.ActiveState.com/cgibin/PPM/ppmserver.plex?urn:/PP +MServer Type: PPMServer 2.0 ppm> rep desc 3 Describing Active Repository 3: Name: crazy Location: http://crazyinsomniac.perlmonk.org/perl/ppm Type: Webpage ppm> rep desc 4 Describing Active Repository 4: Name: PPM3 Location: http://ppm-ia.ActiveState.com/PPM/ppmserver.plex?urn:/PPM/Se +rver/SQL Type: PPMServer 3.0 ppm> rep desc 5 Describing Active Repository 5: Name: rto Location: http://rto.dk/packages/ Type: Webpage ppm> rep desc 6 Describing Active Repository 6: Name: xray Location: http://www.xray.mpe.mpg.de/~ach/ptk/ppm Type: Webpage ppm>
    So what did I do next? well I went to http://search.cpan.org and downloaded it, and installed it (I had all the prerequisited and such).

    Then, out of the goodness of my heart, I put all this stuff up on my PPM package repository.

    So if you do a ppm> rep add crazy http://crazyinsomniac.perlmonk.org/perl/ppm you can use ppm to get and install it.

    At my repository you can also find the following useful tidbit

    =pod one time, ppm was giving me grief, and would not install a local copy of Wx, so I cracked it open, and I came up with the following (I had extracted the tarball, and in my current directory I had the blib directory, which is practically all that a ppm package contains, so I typed 'perl' and then pasted the following in. I could turn it into a nice commandline program ... maybe I will sometime soon ;). =cut #!/usr/bin/perl -w use Cwd; use strict; use Config; use ExtUtils::Install; use ActivePerl::DocTools; my %current_package; ###################################################################### +#################### #$current_package{'NAME'} = 'Wx'; print "Enter the package name :"; $current_package{'NAME'} = <STDIN>; chomp($current_package{'NAME'}); ###################################################################### +########### my $inst_archlib = $Config{installsitearch}; my $inst_root = $Config{prefix}; my $packlist = MM->catfile("$Config{installsitearch}/auto", split(/-/, $current_package{'NAME'}), ".packlist"); # copied from ExtUtils::Install my $INST_LIB = MM->catdir(MM->curdir,"blib","lib"); my $INST_ARCHLIB = MM->catdir(MM->curdir,"blib","arch"); my $INST_BIN = MM->catdir(MM->curdir,'blib','bin'); my $INST_SCRIPT = MM->catdir(MM->curdir,'blib','script'); my $INST_MAN1DIR = MM->catdir(MM->curdir,'blib','man1'); my $INST_MAN3DIR = MM->catdir(MM->curdir,'blib','man3'); my $INST_HTMLDIR = MM->catdir(MM->curdir,'blib','html'); my $INST_HTMLHELPDIR = MM->catdir(MM->curdir,'blib','htmlhelp'); my $inst_script = $Config{installscript}; my $inst_man1dir = $Config{installman1dir}; my $inst_man3dir = $Config{installman3dir}; my $inst_bin = $Config{installbin}; my $inst_htmldir = $Config{installhtmldir}; my $inst_htmlhelpdir = $Config{installhtmlhelpdir}; my $inst_lib = $Config{installsitelib}; while (1) { my $cwd = getcwd(); $cwd .= "/" if $cwd =~ /[a-z]:$/i; eval { ExtUtils::Install::install({ "read" => $packlist, "write" => $packlist, $INST_LIB => $inst_lib, $INST_ARCHLIB => $inst_archlib, $INST_BIN => $inst_bin, $INST_SCRIPT => $inst_script, $INST_MAN1DIR => $inst_man1dir, $INST_MAN3DIR => $inst_man +3dir, $INST_HTMLDIR => $inst_htmldir, $INST_HTMLHELPDIR => $inst_htmlhelpdir},0,0,0); }; # install might have croaked in another directory chdir($cwd); # Can't remove some DLLs, but we can rename them and try again +. if ($@ && $@ =~ /Cannot forceunlink (\S+)/) { my $oldname = $1; $oldname =~ s/:$//; my $newname = $oldname . "." . time(); unless (rename($oldname, $newname)) { return 0; } } # Some other error elsif($@) { return 0; } else { last; } }

     
    ______crazyinsomniac_____________________________
    Of all the things I've lost, I miss my mind the most.
    perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Re: Cant get a specific module.
by hiseldl (Priest) on Jul 05, 2002 at 15:31 UTC
    An alternative that I have used before when PPM was not working is to use the CPAN shell

    C:\perl -MCPAN -e shell cpan> help ...[show help information]... cpan> m /mail::find/ ...[list of available modules from CPAN]...
    It can be a bit of a pain to set up on a win32 box, but it can be a viable alternative to PPM when the repositories do not have the modules you need or they don't have the latest modules. If you need to build the modules you will have to have access to a compiler. GCC in the cygwin distribution should work, and it's free <http://www.cygwin.com/>.
Re: Cant get a specific module.
by rjray (Chaplain) on Jul 05, 2002 at 14:38 UTC

    My experience with Win32-based Perl is somewhat limited, but I believe this indicates that the search engine found a package, but it contains binary (C/XS) code and is not linked for your version of Perl. Earlier versions often have incompatibilities in the binary API. Mail::Find may not yet have been compiled against the most-current version.

    --rjray

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://179640]
Approved by Zaxo
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2022-12-03 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?