On Aug 12, 2007, at 8:33 PM, Noah wrote:

thanks jonasbn,

but the module is still not located.  what else am I doing wrong?


Macintosh-2:~ root# cat ./update.no.version.sh
#!/sw/bin/perl


This is confusing - you are writing a perl script but it ends in .sh? Usually perl scripts end in .pl so that humans know it is a perl script. I started debugging your script thinking it was shell.

use CPAN::Shell;

# install my favorite programs if necessary:
for $mod (qw(Net::FTP MD5 Data::Dumper)){
    my $obj = CPAN::Shell->expand('Module',$mod);
    $obj->install;
}

Since you now use "use CPAN::SHell" the expand now works. :)

# list all modules on my disk that have no VERSION number
for $mod (CPAN::Shell->expand("Module","/./")){
    next unless $mod->inst_file;
     # MakeMaker convention for undefined $VERSION:
    next unless $mod->inst_version eq "undef";
    print "No VERSION in ", $mod->id, "\n";
}

# ./update.no.version.sh
Can't locate CPAN/Shell.pm in @INC

Perl cannot find the package you downloaded called CPAN/Shell.pm. I would be you used two methods to get your perl source: fink and CPAN. If you use fink, fink stuffs things in /sw/, but CPAN puts things in a different place. (See perldoc -q @INC.)

@INC is a set of perl libraries, only in perl they're called modules, that you have on your system. You need to make sure that all the modules that you downloaded are in @INC by telling perl where your modules live. On my Mac I have perl modules in /sw/lib and in /usr/ lib/perl5/site_perl/ which is where Apple installed them.

Just make sure your @INC includes the CPAN::Shell.pm and you should be okay.


(@INC contains: /sw/lib/perl5-core/5.8.8/darwin-thread- multi-2level /sw/lib/perl5-core/5.8.8 /sw/lib/perl5/site_perl/5.8.8/ darwin-thread-multi-2level /sw/lib/perl5/site_perl/5.8.8 /sw/lib/ perl5/site_perl/5.8.8/darwin-thread-multi-2level /sw/lib/perl5/ site_perl .) at ./update.no.version.sh line 3.
BEGIN failed--compilation aborted at ./update.no.version.sh line 3.

Jeremiah Foster
[EMAIL PROTECTED]
---
Key fingerprint = 9616 2AD3 3AE0 502C BD75  65ED BDC3 0D44 2F5A E672



Reply via email to