01mailrc.txt.gz - how to get this file? via console?

hello dear linux-experts

01mailrc.txt.gz - how to get this file

while installing the perl module Parse::CPAN::Authors

and i think that i have some issues with the prerequisit
01mailrc.txt.gz

how to get this file? can i get it via console

note i run openSUSE_13.1

I already told you where to get that file from not too long ago:
http://forums.opensuse.org/showthread.php/498589-installing-Perl-Modules-via-YAST-or-Terminal-(cpan)-Parse-CPAN-Authors?p=2647460#post2647460

And yes, you can download it in console via wget or curl f.e., or just with any web browser… :wink:

some folks tell that i need this thing: ~/.cpan/CPAN/MyConfig.pm

but how ?

Well, if you want to use CPAN to install packages you need that I suppose. It is the configuration file for CPAN and sets where it should install the packages to f.e. But you don’t have to create it manually.
See also http://search.cpan.org/dist/CPAN/lib/CPAN.pm#CONFIGURATION

But that’s unrelated to your original question I’d say.

hello dear wolfi

many thanks for the hints. Glad to hear from you again!

found a script that will download 01mailrc.txt.gz for us.


#!/usr/bin/perl

use strict;
use warnings;
use Net::FTP;

use constant HOST  => 'ftp.cpan.org';
use constant DIR1  => '/pub/CPAN/authors';
use constant FILE1 => '01mailrc.txt.gz';
use constant DIR2  => '/pub/CPAN/modules';
use constant FILE2 => '02packages.details.txt.gz';
use constant FILE3 => '03modlist.data.gz';

my $ftp = Net::FTP->new(
    HOST, 
    Debug => 0, 
    Passive => 1, 
    Timeout => 1
);

$ftp->login('anonymous');
$ftp->cwd(DIR1);
$ftp->ascii;
$ftp->get(FILE1);
$ftp->cwd(DIR2);
$ftp->get(FILE2);
$ftp->size(FILE2);
$ftp->get(FILE3);
$ftp->quit;
}


how do you find this!`?

  • again thanks for your hints and help.

btw : currently i try to install overpass_api on opensuse (with EXPAT) which is pretty hard do do …
i will discuss this in another thread. here:
https://forums.opensuse.org/showthread.php/497525-overpass-api-on-opensuse-13-1?p=2648583#post2648583
Wolfi, i would be more than glad if you can help here…
have a great day

i have some consitency-errors within the perl - see below



install_cpan_pre.pl

#!/usr/bin/perl

use strict;
use warnings;
use Net::FTP;

use constant HOST  => 'ftp.cpan.org';
use constant DIR1  => '/pub/CPAN/authors';
use constant FILE1 => '01mailrc.txt.gz';
use constant DIR2  => '/pub/CPAN/modules';
use constant FILE2 => '02packages.details.txt.gz';
use constant FILE3 => '03modlist.data.gz';

my $ftp = Net::FTP->new(
    HOST, 
    Debug => 0, 
    Passive => 1, 
    Timeout => 1
);

$ftp->login('anonymous');
$ftp->cwd(DIR1);
$ftp->ascii;
$ftp->get(FILE1);
$ftp->cwd(DIR2);
$ftp->get(FILE2);
$ftp->size(FILE2);
$ftp->get(FILE3);
$ftp->quit;
}  




See how i go on - and what is happening



#!/usr/bin/perl

use strict;
use warnings;
use YAML;
use YAML::Dumper;
use Parse::CPAN::Authors;

my $list = '/root/01mailrc.txt.gz';

my $p = Parse::CPAN::Authors->new( $list );
my @authors = $p->authors;

my $dumper = YAML::Dumper->new;
$dumper->indent_width(1);
print $dumper->dump({dump => $p}


some bad things happen



martin@linux-70ce:~/perl> perl cpan2.pl
Failed to read /root/01mailrc.txt.gz: no permission at /usr/lib/perl5/site_perl/5.18.1/Parse/CPAN/Authors.pm line 22.
martin@linux-70ce:~/perl> 


guess that i have to put the file into another path

this one here: /root/01mailrc.txt.gz:

what do you say?`

Well, isn’t it obvious? :wink:
You apparently downloaded it as root and are trying to access it as user.
chmod or chown should help. Or just download it again as user.

And a different path would not hurt either, yes. But you would have to change it in your cpan2.pl as well.
Why not just use the current directory there?
i.e. in line#9:

my $list = '01mailrc.txt.gz';